• Resolved Napsty

    (@napsty)


    Wanted to create a venue for an event, which is happening in Kosovo. Yet this country is not in the list of countries. I tried “Kosovo” and “Cosovo” but no findings. Any idea?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Abz

    (@abzlevelup)

    Hi @napsty,

    Thanks for reaching out to us. Sorry to hear about this issue here.

    This is a known issue with WordPress with the Kosovo (XK) missing. However, could try this snippet here:

    add_filter( 'woocommerce_countries',  'snippetpress_add_kosovo' );
     
    function snippetpress_add_kosovo( $countries ) {
        $new_countries = array(
            'XK'  => __( 'Kosovo', 'woocommerce' ),
        );
        return array_merge( $countries, $new_countries );
    }
     
    add_filter( 'woocommerce_continents', 'snippetpress_add_kosovo_to_continents' );
     
    function snippetpress_add_kosovo_to_continents( $continents ) {
        $continents['EU']['countries'][] = 'XK';
        return $continents;
    }

    See the article here:
    https://snippetpress.com/add-kosovo-to-list-of-woocommerce-countries/

    One thing to note that will only work with WooCommerce.

    Let me know how it goes on your end.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @napsty,

    Since we haven’t heard from you in a while on this topic we will assume that the problem was fixed or is no longer applicable and with that I will mark this as resolved.

    If that is not the case, please let us know and we will gladly remove the “Resolved” tag and try to help you further. Or you can create a new topic with the problem if you prefer.

    Best Regards,
    Abz

    Thread Starter Napsty

    (@napsty)

    No, unfortunately this didn’t work.

    Thread Starter Napsty

    (@napsty)

    The idea seems correct, to apply a filter to an existing event. But what would be the correct event used by the-event-calendar?

    As a quick-fix in the code, search for “$countries = Tribe__View_Helpers::constructCountries( $event->ID );” and add the following lines right below it:

    
    $additional_countries = array( 'XK' => 'Kosovo' );
    $countries = array_merge( $countries, $additional_countries);
    
    • This reply was modified 2 years, 8 months ago by Napsty.
    • This reply was modified 2 years, 8 months ago by Napsty.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Kosovo not in country list?’ is closed to new replies.