Home Forums WC Vendors Pro Support What's the meta key for vendor city?

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 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #77359
    Julian Kanaan
    Participant

    Hi @fervous, back again.

    I’ve been able query with “get_users($args)” with various meta keys from the Store Settings page, but for some reason I can’t do it with City. I’m probably using the wrong meta key.

    Do you know what it is for Vendor City?

    #77360
    WC Vendors Support
    Participant
    #77361
    Julian Kanaan
    Participant

    `<?php
    $location = $_GET[‘userlocation’];
    $type = $_GET[‘usersearch’];
    $args = array(
    ‘meta_query’ =>
    array(
    array(
    ‘relation’ => ‘OR’,
    array(
    ‘key’ => ‘_wcv_custom_settings_store’,
    ‘value’ => $type
    ),
    array(
    ‘key’ => ‘_wcv_store_city’,
    ‘value’ => $location
    )
    )));
    $results = get_users( $args );
    if (count($results) > 0) {
    // start the loop
    foreach ( $results as $user ) {
    echo ‘<span>’ . esc_html( $user->user_email ) . ‘</span>’;
    }
    }
    else {
    echo ‘nothing found’;
    }
    ?>`

    #77363
    Julian Kanaan
    Participant

    Thanks @ben. Posted my code for posterity

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