Last active
September 17, 2020 21:53
-
-
Save hlashbrooke/5954698 to your computer and use it in GitHub Desktop.
WooCommerce Product Vendors: Change vendor URL slug
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( 'product_vendors_vendor_slug', 'change_vendor_url_slug' ); | |
function change_vendor_url_slug( $slug ) { | |
$slug = 'new_url'; | |
return $slug; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oddly enough, this is the same change suggested in the official WooCommerce documentation.
A workaround I've used is to change the language to en_CA, then modify the .po file to reflect the necessary changes, leaving the rest of lines untouched. You then select English (Canada) as the language for the WooCommerce site and it will show the changes.