Merge branch 'master' of github.com:woothemes/woocommerce
This commit is contained in:
commit
39785ee760
|
@ -43,10 +43,10 @@ class WC_Product_Factory {
|
|||
$product_type = 'variation';
|
||||
} else {
|
||||
$terms = get_the_terms( $product_id, 'product_type' );
|
||||
$product_type = ! empty( $terms ) && isset( current( $terms )->name ) ? sanitize_title( current( $terms )->name ) : 'simple';
|
||||
$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