Home Forums Themes Support Gecko Adding USD after product prices

Topic Resolution: Resolved
Viewing 7 reply threads
  • Author
    Posts
    • #15576

      Hi,

      Is there a way that I can add “USD” after the products prices or somewhere in the checkout area so the customer knows that we charge in USD? Thanks.

    • #15582

      Hi,

      Please add below code to fucntions.php in gecko-child included in package of gecko you download from Theme Forest and install gecko-child.zip like as you install gecko.zip theme.

      function addPriceSuffix($format, $currency_pos) {
      	switch ( $currency_pos ) {
      		case 'left' :
      			$currency = get_woocommerce_currency();
      			$format = '%1$s%2$s ' . $currency;
      		break;
      	}
       
      	return $format;
      }
       
      add_action('woocommerce_price_format', 'addPriceSuffix', 1, 2);

      Best regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #15584

      Am I able to add this code using the editor in the WP dashboard?

    • #15585

      No,

      This code is PHP fucntion, you can’t add in WP Dashboard

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #15587

      So I should I go back into my Themeforest account to download the latest version of the theme from there, edit the correct file and then upload just that single file back into my site? Can you please give me more information on exactly how to upload that single file please? I don’t want to make any mistakes. Thanks.

    • #15588

      Update: I’ve added the coding to the correct file and now have it back in the gecko-child.zip folder. I just need to know how to correctly upload it back into my site. Thanks.

    • #15589

      Hi,

      Please install gecko-child via Appearance > Themes > Add new and upload gecko-child.zip

      Best regards!

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    • #15616

      Thanks!

Viewing 7 reply threads

You must be logged in to reply to this topic.