Home Forums WC Vendors Pro Support Shipping country variable not catched

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.


Thank you to all of our customers!


Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #54975
    Nataliia Vernyhora

    Good day!

    I want to use $store_country variable for my custom product-edit.php

    I’m going to use this way:

    <?php if ( $store_country = ‘Canada’ ) : ?>
    Exact block for this country
    <?php endif; ?>

    In the same file I determine a variable for $store_country:
    $vendor_id = WCV_Vendors::get_vendor_from_product( $product_id );
    $countries = WCVendors_Pro_Form_Helper::countries();
    $store_country = $countries[ get_user_meta( $vendor_id, ‘_wcv_store_country’, true ) ];

    I checked if the country of exact vendor is catched on my page using <?php echo $store_country ?>, but I still get empty data for $store_country.

    Do I miss something? Thanks!



    If you’re on the product-edit page you can just use $vendor_id = get_current_user_id(); instead.



Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.