• Resolved gamicord

    (@gamicord)


    Hello Sir,
    If you go here— [ redundant link removed ] —– and go to the cart, You will see a Pop up like this—- https://prnt.sc/CGW0pI_6dexN

    — telling you about your country, and what payment options are available for you.

    How can we achieve something like that in WordPress using WooCommerce and your plugin?

    Regards.

    • This topic was modified 2 years, 4 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pablo Pacheco

    (@karzin)

    Hi @gamicord ,

    Sorry for the delay. This plugin is simply supposed to display WooCommerce notices in pop-ups.

    For example, you could do something like this to have the notice in a pop-up:

    add_action( 'wp', function () {
    	if ( is_cart() ) {
    		$country = 'Nigeria';
    		$message = "Your location is set to {$country}.";
    		$message .= ' ';
    		$message .= "Shop in NGN.";
    		$message .= ' ';
    		$message .= "Get shipping options for Nigeria.";
    		wc_add_notice( $message );
    	}
    } );
    Thread Starter gamicord

    (@gamicord)

    This your reply is pretty beautiful. Thanks so much for it.

    What I do not understand though, is if I and you are on the same page? — meaning, if I enter this your Code, will it auto-detect when a user is approaching the Checkout Page, then auto-suggest the available Payment Option to them?

    2.) Is this code simply to create a Popup? Or how do I use this code?

    Regards.

    Plugin Author Pablo Pacheco

    (@karzin)

    Hi @gamicord ,

    It seems that you want to show the current gateways based on the country. Unfortunately, this is not the scope of this plugin, as it’s only supposed to display already existing notices as popups.

    But, if you manage to find some other plugin to display that info on a WooCommerce notice, the Popup plugin will display it on a popup instead.

    Plugin Author Pablo Pacheco

    (@karzin)

    I’m closing the ticket. Let me know if you have any other questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WooCommerce country notice’ is closed to new replies.