• mmhowey

    (@mmhowey)


    Hi,

    I am using a WordPress site and the BigCommerce for WordPress plugin as my storefront: https://ship.nancyspizza.com. I have embedded checkout enabled. On my BC store, I am using ShipperHQ and so am not able to restrict the countries listed in the Country dropdown using the usual BC methods. However, I have found the Javascript code (listed below) on the BC forums which seems to work to get this accomplished. The problem is that the Javascript does not seem to affect the WordPress embedded checkout. Are there any recommended solutions for this? Thank you in advance!

    <script>
    $(document).ready(function(){
    // Create Interval Timer Function That Runs Every 1.5 Seconds
    var myCountryInterval = setInterval(function() {
    $(‘#countryCodeInput>option’).each(function () {
    // PUT THE COUNTRIES YOU WANT TO KEEP IN THE LIST HERE
    var countries = [ ‘Select a country’, ‘United States’ ];
    var country = $(this).text();
    if (countries.indexOf(country) == -1) {
    $(this).remove();
    }
    });
    }, 1500);
    });
    </script>

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

  • The topic ‘Embedded Checkout’ is closed to new replies.