Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Add a Suffix or Prefix to WooCommerce Product Costs?

Typically chances are you’ll want so as to add suffix or prefix to your Woocommerce product costs and if you want to know find out how to accomplish that then see these two code snippets right here beneath.

Concentrate that each one the snippets proven beneath needs to be added to your baby theme’s capabilities.php file or higher but, use a snippet supervisor like Code Snippets or WpCodeBox (my favourite). When you’re , then seize WPCodeBox with a pleasant 20% low cost right here (SAVE 20% Coupon WPSH20).

add a Suffix to WooCommerce Product Costs?

First lets add a suffix “per particular person” that’s displayed each on archive and single product pages (see screenshot).

How to add a Suffix to WooCommerce Product Prices?
// Add a Suffix to WooCommerce Product Costs
add_filter( 'woocommerce_get_price_suffix', 'wpsh_woo_price_suffix', 99, 4 );
  
perform wpsh_woo_price_suffix( $html, $product, $worth, $qty ){
    $html .= ' / per particular person';
    return $html;
}

add a Prefix to WooCommerce Product Costs?

Subsequent, let’s add a prefix “Per particular person:” that’s displayed in your archive and single product pages (see screenshot).

How to add a Prefix to WooCommerce Product Prices?
// Add a prefix to WooCommerce product costs
add_filter( 'woocommerce_get_price_html', 'wpsh_woo_price_prefix', 99, 2 );
  
perform wpsh_woo_price_prefix( $worth, $product ){
    $worth = 'Per particular person: ' . $worth;
    return $worth;
}

Helpful Woocommerce hacks

  • Customise Woocommerce Inventory Standing? (17 hacks)

  • show Woocommerce my account tabs horizontally?

  • Show Woocommerce Fee Strategies Conditionally? (14 hacks)

  • Add Customized Endpoints in WooCommerce?

  • show Woocommerce my account tabs horizontally?

  • Show Woocommerce Fee Strategies Conditionally? (14 hacks)

  • Add Customized Endpoints in WooCommerce?

  • Disguise Woocommerce Delivery Strategies (Conditionally) – A Full Information

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart