Add currency suffix on cart and checkout pages in WooCommerce

Add currency suffix on cart and checkout pages in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_price_format', 'add_currency_suffix', 10, 2 );

function add_currency_suffix( $price, $currency_symbol ) {

  // Only add the suffix on cart and checkout pages
  if ( is_cart() || is_checkout() ) {

    // Get the current currency code
    $currency = get_woocommerce_currency();

    // Add the suffix to the price
    $price .= ' ' . $currency;

  }

  return $price;

}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.