How to reorder checkout form fields in WooCommerce

How to reorder checkout form fields in WooCommerce add_filter(“woocommerce_checkout_fields”, “order_fields”); function order_fields($fields) { $order = array( “billing_first_name”, “billing_last_name”, “billing_phone”, “billing_email”, “billing_postcode”, ); foreach($order as $field) { $ordered_fields[$field] = $fields[“billing”][$field]; }

Read More

Important hooks for Checkout Page of WooCommerce

Default add_actions of Checkout Page of WooCommerce are below : add_action( ‘woocommerce_before_checkout_form’, ‘woocommerce_checkout_login_form’, 10 ); add_action( ‘woocommerce_before_checkout_form’, ‘woocommerce_checkout_coupon_form’, 10 ); add_action( ‘woocommerce_checkout_order_review’, ‘woocommerce_order_review’, 10 ); add_action( ‘woocommerce_checkout_order_review’, ‘woocommerce_checkout_payment’, 20 );

Read More