Skip to content

Instantly share code, notes, and snippets.

@fervous
Created May 11, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fervous/2a3488e57740423a3d0343f8f49ac996 to your computer and use it in GitHub Desktop.
Save fervous/2a3488e57740423a3d0343f8f49ac996 to your computer and use it in GitHub Desktop.
Rename Change Product Type Label WC Vendors Pro
/* WC Vendors Pro Rename Product Types */
/* Simple change to Sell */
add_filter('wcv_product_type_selector', 'wcv_product_type_selector_rename');
function wcv_product_type_selector_rename( $product_type_selector ){
if ( array_key_exists('simple', $product_type_selector ) ) $product_type_selector[ 'simple' ]= 'Sell';
return $product_type_selector;
}
/* Bookable change to Rental */
add_filter('wcv_product_type_selector', 'wcv_product_type_selector_rename_bookable');
function wcv_product_type_selector_rename_bookable( $product_type_selector ){
if ( array_key_exists('booking', $product_type_selector ) ) $product_type_selector[ 'booking' ]= 'Rental';
return $product_type_selector;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment