Change WooCommerce Price to be by Weight


You can change the WooCommerce price to be by weight by appending some text after the actual price such as ‘per kg’, this can be done by manipulating 3 filters that display the price in the shop/product page, cart and checkout pages; woocommerce_get_price_html woocommerce_cart_item_price woocommerce_checkout_cart_item_quantity If all items were to be classified as ‘per kg‘…

Read More

Hide WooCommerce Product Categories on Shop or other Page


You can hide certain WooCommerce product categories from the shop or other targetted page, by using an action called woocommerce_product_query Add it in via functions.php and it works like so… So the action is wrapped in a conditional statement that targets the pages you want the Product Categories to not display. Then in the $tax_query array set…

Read More

Change the WooCommerce Shop Page URL


You can change the WooCommerce shop URL with a filter that WooCommerce provides, this can be helpful especially if you have a one product based shop and you want your users to return to that product and not the default shop page URL. The filter to use is aptly named – woocommerce_return_to_shop_redirect add_filter( ‘woocommerce_return_to_shop_redirect’, ‘st_woocommerce_shop_url’ );…

Read More

AutoComplete WooCommerce Paypal Order from Processing to Complete


Using WooCommerce and Paypal, sometimes the order does not go from processing to complete on payment of the order at Paypal and you manually have to set it to complete, this snippet as provided by woothemes fixes this issue. /** * Auto Complete all WooCommerce orders. * Add to theme functions.php file */ add_action( ‘woocommerce_thankyou’,…

Read More