Adding CSS styles into WooCommerce emails

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…
Changing the WooCommerce coupon text in cart and checkout pages

Want to change the WooCommerce coupon text… there are a few areas that need to be tackled namely the cart and the checkout pages, WooCommerce has most of the filters needed and the gettext filter can finish off translating the…
Make price in WooCommerce an absolute value

You can make the prices displayed in WooCommerce an absolute value and remove the decimal .00 places with the WooCommerce woocommerce_price_trim_zeros filter. So for example to go from $50.00 to $50 In your functions.php add the following… /** * WooCommerce…
Change the WooCommerce return to shop and continue shopping URLs

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…
Add Search & Filter Pro Filters In Off-Canvas Menu

Adding the Search & Filter Pro filters in an off-canvas menu can be a better user experience on mobile devices. This guide uses UABBs Off-Canvas Module with a WooCommerce main shop page built in Beaver Themer. With a desktop/tablet layout…
Set up WooCommerce shop page with Search and Filter Pro and Beaver Themer

Here is how you can set up the main WooCommerce shop page with Search and Filter Pro and Beaver Themer. The layout is to have the filter options on the left and products on the right, the filtering is using…
Add WooCommerce Cart Icon to Menu with Cart Item Count

Here is a way to add WooCommerce cart icon to a menu with the cart item count, it links to the cart page and displays the number of items that have been added to the cart. The code uses three functions…
Change 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…
Using WooCommerce with Varnish, exclude pages and cookies

To use WooCommerce with Varnish server-side caching you need to exclude some of the generic WooCommerce pages and cookies. Some web hosts will partially do this for you and others will give you an interface to add them yourself, make…
Fix Google Search Console Coverage Errors – WooCommerce

Google Search Console alerts users when certain pages submitted in the sitemap are set to no-index and generates a coverage error, this can include WooCommerce pages like… /cart /checkout /my-account /?-add-to-cart These pages shouldn’t be cached or indexed and are…