From 261ae0ebda0a3cc79ee6ff711544b7a0d21081ba Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 6 Apr 2017 14:18:17 +0100 Subject: [PATCH] Only call sync if callable --- includes/legacy/abstract-wc-legacy-product.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/legacy/abstract-wc-legacy-product.php b/includes/legacy/abstract-wc-legacy-product.php index 2b0939407ae..9582a9986e7 100644 --- a/includes/legacy/abstract-wc-legacy-product.php +++ b/includes/legacy/abstract-wc-legacy-product.php @@ -535,10 +535,12 @@ abstract class WC_Abstract_Legacy_Product extends WC_Data { } // Sync prices with children - self::sync( $product_id ); + if ( is_callable( array( __CLASS__, 'sync' ) ) ) { + self::sync( $product_id ); - // Re-load prices - $this->read_product_data(); + // Re-load prices + $this->read_product_data(); + } } /**