Support » Plugin: Price Based on Country for WooCommerce » Hide price on other country

  • Resolved bigrat95

    (@bigrat95)


    Hi,

    How can I hide price in other country. I only want to display CAD in Canada and USD in US.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi!

    Currently, to hide the price by the country you need an additional plugin, like Catalog Visibility Options.

    Regards,
    Oscar.

    bigrat95

    (@bigrat95)

    Oh, I just realised that if I don’t add a price in a specific country, the price will not be shown.

    Is there a way that I can bulk add Asia, Africa and Europe together? I need to disable the prices in these continents.

    • This reply was modified 2 years ago by bigrat95.
    • This reply was modified 2 years ago by bigrat95.
    • This reply was modified 2 years ago by bigrat95.

    Try this –
    Go to Woocommerce > Settings > Zone Pricing > Zone
    to configure zones you want to hide and the rates to whatever value which are none 0.

    And open this file in plugin folder:
    woocommerce-product-price-based-on-countries/includes/class-wcpbc-frontend-pricing.php

    Find line 36,
    paste following code:

    //do_action( 'wc_price_based_country_frontend_princing_init' );
            remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
            remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
            remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
            remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );

    It will also disable the add to cart button.
    Good Luck!

    • This reply was modified 1 year, 9 months ago by piggy811.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide price on other country’ is closed to new replies.