Created
September 21, 2020 08:51
-
-
Save junenacpil29/5fa35000caaa6d3c9a56d88b142ac526 to your computer and use it in GitHub Desktop.
WC Vendors | Show both the State and Country, but not city or house address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wcv_format_store_address_args', 'my_wcv_format_store_address', 11, 2 ); | |
function my_wcv_format_store_address( $address_args, $vendor_id ) { | |
$address_args = array( | |
'country' => WC()->countries->countries[ get_user_meta( $vendor_id, '_wcv_store_country', true ) ], | |
'city' => get_user_meta( $vendor_id, '_wcv_store_city', true ), | |
); | |
return $address_args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment