Merge branch 'master' of github.com:woothemes/woocommerce

This commit is contained in:
Neil Pie 2013-02-21 09:23:47 +00:00
commit 39785ee760
1 changed files with 2 additions and 2 deletions

View File

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