Skip to content

Instantly share code, notes, and snippets.

@hlashbrooke
Last active September 17, 2020 21:53
Show Gist options
  • Save hlashbrooke/5954698 to your computer and use it in GitHub Desktop.
Save hlashbrooke/5954698 to your computer and use it in GitHub Desktop.
WooCommerce Product Vendors: Change vendor URL slug
add_filter( 'product_vendors_vendor_slug', 'change_vendor_url_slug' );
function change_vendor_url_slug( $slug ) {
$slug = 'new_url';
return $slug;
}
@adamcollingburn
Copy link

Doesn't seem to work anymore

(WooCommerce Product Vendors 2.1.17)

@hlashbrooke
Copy link
Author

This wouldn't have worked since v2.0 of Product Vendors when the codebase was largely refactored.

@adamcollingburn
Copy link

@hlashbrooke - Dang!

@Betialai
Copy link

Betialai commented Sep 17, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment