Uncheck default “Ship to different address” on woocommerce checkout using functions.php

Posted by on Mar 19, 2018 in Blog, PHP, Woocommerce | No Comments

“Ship to different address” is the default setting on woocommerce checkout. There has been much discussion about why this is or is not a good idea. See this thread https://github.com/woocommerce/woocommerce/issues/2571 As we all know, in the end though the client rules, and this is what my client had to say. The “ship to a different […]

get_dimensions() for displaying dimensions deprecated in woocommerce 3

Posted by on Jun 15, 2017 in Blog, PHP, Woocommerce | No Comments

The code to display product dimensions has changed in woocommerce 3 This is my old code which was in my child themes functions.php file. It displayed the product dimensions next to the label ‘Dimensions:’ on the single product page only if dimensions had been entered in the backend. If no dimensions were entered nothing appeared […]

Add the stock status to Woocommerce Shop and Category pages

Posted by on Aug 7, 2014 in Blog, PHP, Themes, Woocommerce | 5 Comments

Woocommerce displays the Stock Status, for example ‘Out of stock’ or ‘6 in stock’ on the single product page. I needed to display the message on the Shop and Category pages. Also my client actually only wanted to display the status when a product was ‘Out of stock’ Thanks to Bryce from Woocommerce for help […]

Returning Arrays in PHP, a simple example

Posted by on Aug 7, 2014 in Blog, PHP, Themes, Wordpress | No Comments

This one is just a little post for myself really. It may be handy for someone else. WordPress will often store data in Array in PHP. When you go to return something back by name you just get the result ‘Array’ Not very helpful. First to create the array To return all of the items […]