Categories
CMS Mastering Development Wordpress

Create custom WC checkout field and save to a table

I have created some custom fields and hidden fields on the WooCommerce checkout page depending on the product id and I have some code that is supposed to save these fields to the order meta data, but the SAVING PART isn’t working <?php /** * Add the field to the checkout */ add_action( ‘woocommerce_after_checkout_billing_form’, ‘my_custom_checkout_field’ […]

Categories
CMS Mastering Development Wordpress

Adding a custom Shipping methods field to an order

I have created a custom filed in a Shipping methods as per: function shipping_instance_form_add_extra_fields($settings) { $settings[‘shipping_extra_field’] = [ ‘title’ => ‘Route Number’, ‘type’ => ‘text’, ‘placeholder’ => ‘1,2,3…’, ‘description’ => ‘Enter route number’ ]; return $settings; } I need to add the router number at the time of order to a order, it can change […]

Categories
Development PHP WooCommerce Wordpress

Trying to place a custom field after the total section in the checkout page in woocommerce

This code correctly works but does not place the custom field where I want it. In the add_action I would like to use woocommerce_review_order_after_order_total as the location attribute to place it on the page. I got the hook name from this visual guide https://businessbloomer.com/woocommerce-visual-hook-guide-checkout-page/ However this hook (seen in a comment in the code below […]