From 0ff59bcd5b93957cc58fe2c598349a39288d15d6 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 13 Aug 2013 13:02:20 +0100 Subject: [PATCH] remove deprecated function. Closes #3582. --- includes/class-wc-product-factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-product-factory.php b/includes/class-wc-product-factory.php index c4999c8ce47..3c046ec2f4c 100644 --- a/includes/class-wc-product-factory.php +++ b/includes/class-wc-product-factory.php @@ -47,7 +47,7 @@ class WC_Product_Factory { } // Create a WC coding standards compliant class name e.g. WC_Product_Type_Class instead of WC_Product_type-class - $classname = 'WC_Product_' . preg_replace( '/-(.)/e', "'_' . strtoupper( '$1' )", ucfirst( $product_type ) ); + $classname = 'WC_Product_' . implode( '_', array_map( 'ucfirst', explode( '-', $product_type ) ) ); } else { $classname = false; $product_type = false;