• Resolved vipteam

    (@vipteam)


    Hi Support,

    I want to enable affiliate registration for only one country. The reason is that the website is intended only for users of the country where the products/services are provided.

    It would be ideal to enable the selection of one country (in plugin settings), or all countries (that’s the default now).

    I don’t want to complicate my life now by adding a file to the child theme. Maybe something will change in the plugin over time. So that’s not a good idea.

    I would like to use the snippet for functions.php / style.css. I would like to set one country by default. So, it would be a predetermined country. But I have no idea how to achieve that. Can you help me?

    Thanks in advance. Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for reaching out to us.

    I want to enable affiliate registration for only one country. The reason is that the website is intended only for users of the country where the products/services are provided.

    Unfortunately we don’t have that feature in our plugin at present. However you might like to consider installing a country blocking plugin, if there is one.

    Kind regards.

    Thread Starter vipteam

    (@vipteam)

    Completely wrong. I have no need to block countries. I just want to save people from having to scroll through the country selection process. Nothing else.

    I found a solution here (https://library.wpcode.com/snippet/r5pqv928/):

    I need to remove all the countries and add only one country in the dropdown menu located in the form on the affiliate registration page.

    function mepr_remove_countries( $countries, $prioritize_my_country ) {
    return array ( 'DE' => _x( 'Germany', 'ui', 'memberpress' ) );
    }
    add_filter( 'mepr_countries', 'mepr_remove_countries', 10, 2 );

    My problem is that I don’t know how to apply this to Affiliate Manager. And it’s that simple. I need to add a code snippet to my child theme’s functions.php file. I’m not a coder. You’re probably not a coder either. I need help from someone who is.

    Thanks in advance. Regards,

    Plugin Support mbrsolution

    (@mbrsolution)

    Thank you for providing more information. I have submitted a message to the developers to investigate further your request.

    Kind regards.

    Plugin Author affmngr

    (@affmngr)

    Hi, Thanks for the feedback. You can add the following code after updating the plugin:

    function custom_wpam_aff_countries( $countries ) {
    return array ( "DE" => __("GERMANY", "affiliates-manager") );
    }
    add_filter( 'wpam_aff_countries', 'custom_wpam_aff_countries' );
    Thread Starter vipteam

    (@vipteam)

    Thank you very much!

    I was working on a website and applied a new update from the Affiliates Manager plugin. I was surprised with the speed because it is about filtering countries. I spent half an hour trying to find the option in the settings and I couldn’t find it. At least I checked all the settings in the plugin ??

    After that, while checking my inbox, I read that the update was a feature that would accept a code snippet for country filtering. Exactly what I was looking for. Great!

    Thanks again. Have a nice day. Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.