Merge pull request #1851 from Geczy/ucfirst-classname

ucfirst() on the $product_type when instantiating WC_Product_x
This commit is contained in:
Mike Jolley 2012-11-27 07:40:09 -08:00
commit 5124604710
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class WC_Product_Factory {
}
// Filter classname so that the class can be overridden if extended.
$classname = apply_filters( 'woocommerce_product_class', 'WC_Product_' . $product_type, $product_type, $post_type, $product_id );
$classname = apply_filters( 'woocommerce_product_class', 'WC_Product_' . ucfirst($product_type), $product_type, $post_type, $product_id );
if ( class_exists( $classname ) ) {
return new $classname( $the_product, $args );