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';
|
$product_type = 'variation';
|
||||||
} else {
|
} else {
|
||||||
$terms = get_the_terms( $product_id, 'product_type' );
|
$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 {
|
} else {
|
||||||
$classname = false;
|
$classname = false;
|
||||||
$product_type = false;
|
$product_type = false;
|
||||||
|
|
Loading…
Reference in New Issue