Change ‘Return To Store’ text button in WooCommerce

Woocommerce Return To Store Button

WooCommerce version 2.6 has brought out a new text filter that lets you change the text of ‘Return To Store’ on the button that appears on the cart page when the cart is empty. The filter is called woocommerce_return_to_shop_text and this is how you can use it. add_filter(‘woocommerce_return_to_shop_text’, ‘prefix_store_button’); /** * Change ‘Return to Shop’…

Read More

Create a WooCommerce Featured Products Loop of Featured Images

Woocommerce Featured Product Loop

Here is a guide on how to create a WooCommerce featured products loop of featured images. The featured product option is chosen from the star column in the WordPress dashboard backend of the WooCommerce products, ‘featured‘ it is a term that belongs to the taxonomy named ‘product_visibility‘.     View the code on Gist. So…

Read More

WooCommerce Only Show Free Shipping Rates

Free Shipping Woocommerce

You can force WooCommerce to only show free shipping rates if the carts contents qualify and hide the other shipping rates with this code snippet below, which uses the woocommerce_package_rates filter, it goes in your themes functions.php file add_filter( ‘woocommerce_package_rates’, ‘prefix_hide_shipping_when_free_is_available’, 100 ); /** * Hide shipping rates when free shipping is available. * Updated…

Read More

Rename Home name and link in WooCommerce Breadcrumbs

Change Woocommerce Breadcrumb

You can change the Home name and home url link in WooCommerce breadcrumbs with 2 filters,  woocommerce_breadcrumb_defaults and woocommerce_breadcrumb_home_url Change WooCommerce Home Text in Breadcrumb add_filter( ‘woocommerce_breadcrumb_defaults’, ‘prefix_change_breadcrumb_home_text’ ); /** * Rename “home” in WooCommerce breadcrumb */ function prefix_change_breadcrumb_home_text( $defaults ) { // Change the breadcrumb home text from ‘Home’ to ‘Shop’ $defaults[‘home’] = ‘Shop’;…

Read More

Move WooCommerce Product Long Description Into The Short Description Product Layout

Move Woocommerce Long Description

How to move the woocommerce product long description text into the short description product layout with a couple of woocommerce actions and the long description tab removal. Remove The Description Tab This tab by default has the long product description. The above will remove all 3 tabs just comment out which if any tabs you…

Read More

Change ‘You may also like’ and ‘You may be interested in’ WooCommerce text

Change Woocommerce Text You May Be Intersted In

The text strings ‘You may also like’ and ‘You may be interested in’ in WooCommerce can be changed with the gettext filter…   add_filter( ‘gettext’, ‘bt_translate_like’ ); add_filter( ‘gettext’, ‘bt_translate_like_cart’ ); /** * @snippet Trsnslate “You may also like…” Text – WooCommerce * @how-to Watch tutorial @ https://businessbloomer.com/?p=19055 * @sourcecode https://businessbloomer.com/?p=595 * @author Rodolfo Melogli…

Read More

Show thumbnail images in WooCommerce order emails

Woocommerce Emails With Images

Thumbnail images can be shown in WooCommerce order emails with the filter woocommerce_email_order_items_args add_filter( ‘woocommerce_email_order_items_args’, ‘bt_email_order_items_args’, 10, 1 ); /** * WooCommerce * Show thumbs in Order Email sent to customers */ function bt_email_order_items_args( $args ) { $args[‘show_image’] = true; $args[‘image_size’] = array( 150, 150 ); return $args; } If you want the images to…

Read More

Adding CSS styles into WooCommerce emails

Woocommerce Email Styles

WooCommerce emails can have CSS inline styles added via an action hook woocommerce_email_header, to add your CSS styles use the hook like below… add_action( ‘woocommerce_email_header’, ‘bt_add_css_to_email’ ); /** * WooCommerce * Add inline CSS to emails sent out */ function bt_add_css_to_email() { echo ‘ <style type=”text/css”> h1 { text-align: center !important; color: #c7c9c7; } </style></pre>…

Read More