Restrict WooCommerce Shipping Calculator to Specific Countries and States

Shipping Countries States Woocommerce

Here is how you can restrict specific Countries and States in WooCommerce Shipping Calculator, so a user can only select from what is available. Countries The Countries field is handled inside WooCommerce General Settings. Change the ‘Selling Location’ to ‘Sell to specific countries then add the countries you want in the next field. States For…

Read More

How to make both City and Postcode fields required in WooCommerce Shipping Calculator

Woocommerce Shipping Fields Calculator

Both the City and Postcode/ZIP fields in the WooCommerce Shipping Calculator are not compulsory for the user to fill in, you may need them mandatory for a better user experience to calculate certain shipping conditions. Both the Suburb and Postcode fields are input fields inside a form which allows us to use the required attribute,…

Read More

Change the Additional Information Placeholder Text field in WooCommerce

remove order notes field woocommerce

You can change the WooCommerce  Additional Information placeholder text field in the checkout page with the woocommerce_checkout_fields filter. Use it in your themes  functions.php file like so… add_filter( ‘woocommerce_checkout_fields’ , ‘wpb_custom_additional_info’ ); // Change placeholder text in Additional Notes function wpb_custom_additional_info( $fields ) { $fields[‘order’][‘order_comments’][‘placeholder’] = ‘Any additional notes for delivery’; return $fields; } Change…

Read More

Filter & Change WooCommerce ‘Place Order’ Text Button on Checkout Page

Change Woocommerce Place Order Button

You can filter and change WooCommerce’s ‘Place Order’ Text Button on the Checkout Page using the filter woocommerce_order_button_html   The default mark up of the Place Order checkout button is: <button type=”submit” class=”button alt” name=”woocommerce_checkout_place_order” id=”place_order” value=”Place order” data-value=”Place order”>Place order</button> You can use the filter like so: add_filter( ‘woocommerce_order_button_html’, ‘custom_order_button_html’); function custom_order_button_html( $button )…

Read More

Add a required checkbox field in WooCommerce checkout page

Add Woocommerce Checkbox

Here is how you can add a required checkbox field in the WooCommerce checkout page that forces a user to checkbox the request before they can proceed to payment, similar to the terms and condition checkbox. WooCommerce Form Field Add the code in your functions.php – the example uses the a new checkbox field named…

Read More