Skip to content
Advertisement

Tag: woocommerce

Sorting priority for specific Woocommerce checkout fields depending on country

In Woocommerce, I need to set the default ordering priority (sorting) of three fields on the checkout page: The first change depends on the choice of the ‘IT’ country code: postcode – ‘priority’ => 91, The other two are free of conditions, I just need to set the default priority: billing_email – ‘priority’ => 30, billing_phone – ‘priority’ => 40,

Sort Orders IDs alphabetically based on the shipping last name in Woocommerce

I need to sort my $order_name (more specifically $order_shipping_last_name) alphabetically. I’ve tried many different basic php sort() methods, in many different places, and can’t get this to work. I’m assuming I’m missing something? In my code, get_all_orders_that_have_a_product_variation( $product_id ); function comes from this answer code that allow to get an array of orders IDs from a variation ID… The list

Shipping carrier custom fields validation in Woocommerce checkout page

I have added two custom input fields in the shipping method section by changing the template /genesis-sample/woocommerce/checkout/review-order.php I have also managed to get them conditionally required. Only when the specific radio button is checked, the input fields appear and become required. I am using jQuery code to make the fields appear and disappear. All of this is working fine. The

Advertisement