From f21e47f7d06e139bfc56ef436d94c1a57de6d391 Mon Sep 17 00:00:00 2001 From: claudiulodro Date: Mon, 17 Apr 2017 14:45:53 -0700 Subject: [PATCH] Update save logic to allow filtering --- includes/admin/meta-boxes/views/html-product-data-panel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/views/html-product-data-panel.php b/includes/admin/meta-boxes/views/html-product-data-panel.php index 3023c7da854..f8dc6579c7e 100644 --- a/includes/admin/meta-boxes/views/html-product-data-panel.php +++ b/includes/admin/meta-boxes/views/html-product-data-panel.php @@ -12,7 +12,7 @@ $option ) : - if ( $product_object ) { + if ( metadata_exists( 'post', $post->ID, '_' . $key ) ) { $selected_value = is_callable( array( $product_object, "is_$key" ) ) ? $product_object->{"is_$key"}() : 'yes' === get_post_meta( $post->ID, '_' . $key, true ); } else { $selected_value = 'yes' === ( isset( $option['default'] ) ? $option['default'] : 'no' );