Home Forums WC Vendors Pro Support country of vendor

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.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17214
    netteran
    Participant

    How can I display the country of Vendor from vendor address?

    For the whole address we use <?php echo $address; ?>, but for the country of origin only?

    Thanks in advance!

    #17252
    WC Vendors Support
    Participant
    
    $store_id 	= WCVendors_Pro_Vendor_Controller::get_vendor_store_id( get_current_user_id() ); 
    $address1 	= get_post_meta( $store_id, '_wcv_store_address1', 	true ); 
    $address2 	= get_post_meta( $store_id, '_wcv_store_address2', 	true ); 
    $city	 	= get_post_meta( $store_id, '_wcv_store_city', 		true ); 
    $state	 	= get_post_meta( $store_id, '_wcv_store_state',		true ); 
    $country	= get_post_meta( $store_id, '_wcv_store_country', 	true ); 
    $postcode	= get_post_meta( $store_id, '_wcv_store_postcode', 	true ); 
    

    This is the code we use to save pull it up on the Pro Dashboard. As you can see, the Vendor Store post ID has a meta key of _wcv_store_country so you’d pull that up, and echo it out anywhere you like.

    #17263
    netteran
    Participant

    Thanks!

    ..but it displays only the 2-letter code of the country that is used for shipment like US GB DE etc.

    How to pull up the full country name so it is more intuitive for a user/viewer?

    #17265
    WC Vendors Support
    Participant

    We use the code in /public/class-wcvendors-pro-form-helper.php starting line #770 to pull the full country name out of the array of country codes.

    #17269
    netteran
    Participant

    Wish I was a better php coder to make use of the above information 😉

    Is there more “direct” method to display the full country name, can you give me a code that I need to implement on store-header.php?

    Appreciate your help.

    #17270
    WC Vendors Support
    Participant

    Well, we’re here to support the plugin. If you want it custom coded, these fingers dont type for free. 🙂

    #17271
    netteran
    Participant

    Ofcourse.

    Thanks for your help tho 😉

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.
This website uses cookies to ensure you get the best experience on our website.