From ffd512a55e09ba0aaa4be8934f29258d90882e6a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Tue, 3 Feb 2015 16:14:56 +0000 Subject: [PATCH] Why assign $the_product to itself? --- includes/class-wc-product-factory.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/class-wc-product-factory.php b/includes/class-wc-product-factory.php index cdc550144f3..74de3971c91 100644 --- a/includes/class-wc-product-factory.php +++ b/includes/class-wc-product-factory.php @@ -85,9 +85,7 @@ class WC_Product_Factory { $the_product = get_post( $the_product ); } elseif ( $the_product instanceof WC_Product ) { $the_product = get_post( $the_product->id ); - } elseif ( $the_product instanceof WP_Post ) { - $the_product = $the_product; - } else { + } elseif ( ! ( $the_product instanceof WP_Post ) ) { $the_product = false; }