Merge pull request #2496 from thenbrent/slug-not-sanitize
Use product_type slug not sanitized term name
This commit is contained in:
commit
dfddb41774
|
@ -46,7 +46,7 @@ class WC_Product_Factory {
|
|||
$product_type = ! empty( $terms ) && isset( current( $terms )->slug ) ? current( $terms )->slug : 'simple';
|
||||
}
|
||||
|
||||
$classname = 'WC_Product_' . ucfirst( $product_type );
|
||||
$classname = 'WC_Product_' . preg_replace( '/(?<=_)(.)/e', "strtoupper( '$1' )", ucfirst( $product_type ) );
|
||||
} else {
|
||||
$classname = false;
|
||||
$product_type = false;
|
||||
|
|
Loading…
Reference in New Issue