Merge pull request #2496 from thenbrent/slug-not-sanitize

Use product_type slug not sanitized term name
This commit is contained in:
Coen Jacobs 2013-02-21 00:14:25 -08:00
commit dfddb41774
1 changed files with 1 additions and 1 deletions

View File

@ -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;