Restrict WooCommerce Shipping Calculator to Specific Countries and States
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 MoreHow to make both City and Postcode fields required in WooCommerce Shipping 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 MoreChange the Additional Information Placeholder Text field in 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 MoreAdd WooCommerce Action Hook via Shortcode
Some WordPresss WooCommerce templates provided by themes or page builders may not include all the WooCommerce action hooks which may hinder your woo development as you add in more Woo featured, luckily it is possible to add in Woo hooks with shortcode. add_shortcode( ‘woohook’, function( $atts ) { $atts = shortcode_atts( array( ‘hook’ => ”,…
Read MoreMake a whole container a clickable link in Bricks Builder
To add a link to a whole container element in a Bricks Builder layout you need to use some jQuery to add the link tag markup to make the whole container clickable. There needs to be 1 link already within the containers nested elements – that is the link that will be used for the…
Read MoreIncrease the Upload Size for MySQL Database in cPanel with phpMyAdmin
cPanel/WHM Server imposes a limit on the size of importing a WordPress MySQL database that can be imported into phpMyAdmin. The default size is 50MB which is set in the cPanel/WHM settings. You can change the settings either in cPanel or separately in WHM depending on what you have available. Failing that there are other ways…
Read MoreFilter & Change WooCommerce ‘Place Order’ Text Button on Checkout Page
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 MoreReset Permissions to WordPress Site for Files and Directories
If your permissions are incorrect for files and folders in a webroot domain of a WordPress site more than likely you’ll get a server 500 error. Here is how to fix them by resetting the permissions via the command line, especially using the correct defaults for a cPanel domain or other web server for files…
Read MoreAdd a required checkbox field in WooCommerce checkout page
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 MoreSet up Swift Performance Cache with Optimus Prime in Local Mode
Optimus Prime is a cache warmer to load web pages faster on initial load by querying all pages on a websites sitemap via the sitemap URL, it works in harmony with a cache plugin preloading tool. Optimus Prime also has a local mode in which it checks the local cache folder for cached relative URLs…
Read More