Add Product Price in WooCommerce as a Shortcode

Woocommerce Shortcode Product Price

Looking to insert a WooCommerce product price into a layout, well you can add the WooCommerce Product Price as a shortcode using the product ID as an attribute for the correct product. The code below goes into your functions.php file, the add the shortcode where you need to display the price. add_shortcode( ‘cl_product_price’, ‘cl_woo_product_price_shortcode’ );…

Read More

Set a Minimum Subscription Period in WooCommerce Subscriptions

Woocommerce Minimum Subscription

WooCommerce Subscriptions currently doesn’t allow a minimum subscription time period when setting up a subscription, nut you can manipulate the WooCommerce Subscription  Sign-up fee and free trial fields to allow you to do so. Let’s say you want a minimum 3 month sign up period which then defaults to monthly after the 3 months is…

Read More

Add Extra Tabs on WooCommerce Products

Woocommerce Extra Product Tabs

WooCommerce allows you to add extra tabs on a product page alongside description, reviews and additional information with the filter, woocommerce_product_tabs. Let’s say you wanted 2 extra tabs – ‘Ingredients’ and ‘How To Use’ as the heading, you can use the filter woocommerce_product_tabs like so… add_filter( ‘woocommerce_product_tabs’, ‘woo_new_product_tab’ ); /** * Add 2 custom product…

Read More

Add Navigation Arrows in WooCommerce Product Gallery Slider

Woocomerce Navigation Arrows

You can add Navigation Arrows in WooCommerce Product Gallery by adding a filter and then some CSS. WooCommerce uses a slider called Flexslider and it has a few more configurable options. In functions.php add add_filter( ‘woocommerce_single_product_carousel_options’, ‘sf_update_woo_flexslider_options’ ); /** * Filer WooCommerce Flexslider options – Add Navigation Arrows */ function sf_update_woo_flexslider_options( $options ) { $options[‘directionNav’]…

Read More

WooCommerce, Add Short or Long Description to Products on Shop Page

Add Description Product Shop Woocommerce

You can add a WooCommerce products’ long or short description to the actual product on the main shop page in WooCommerce via the woocommerce_after_shop_loop_item_title action hook, this hook places content immediately after the product title. Adding the Long Description to the Product Loop on the Shop page add_action( ‘woocommerce_after_shop_loop_item_title’, ‘wc_add_long_description’ ); /** * WooCommerce, Add…

Read More

Remove the Additional Information and Order Notes fields in WooCommerce

remove order notes field woocommerce

You can remove the Additional Information and Order Notes fields in WooCommerce checkout page with 2 filters that you add to your themes functions.php file The first filter woocommerce_enable_order_notes_field is returning false and will not display the ‘Additional Information’ heading and also the order notes field, I have found it needs to be run with a high…

Read More

Limit the Words in WooCommerce Product Short Description

Woocommerce Product Short Description

WooCommerce has a filter that can limit the words in a product short description field  called ‘woocommerce_short_description‘ – coupled with an existing WordPress function ‘wp_trim_words‘ we can make the description any length to suit teasers, sliders etc and leave other areas where we want the full short description. View the code on Gist. In the…

Read More