Skip to content

Change WooCommerce Sold Out text

Woocommerce Sold Out Text

You can change WooCommerce ‘Sold Out’ text set by the inventory setting of Sold Out with the WooCommerce filter woocommerce_get_availability_text Add the below snippet with your custom sold text to functions.php add_filter(‘woocommerce_get_availability_text’, ‘themeprefix_change_soldout’, 10, 2 ); /** * Change Sold Out Text to Something Else */ function themeprefix_change_soldout ( $text, $product) { if ( !$product->is_in_stock()…

Read More

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

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’] = ‘Add a Shipping address here if different from Billing…

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 View the code on Gist. 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…

Read More
Scroll To Top