From 14af98e9c97c5a559ec3224bafe415ca1a036729 Mon Sep 17 00:00:00 2001 From: Gerhard Potgieter Date: Thu, 18 Jan 2018 11:37:03 +0200 Subject: [PATCH] Add image gallery crud functionality for saving and reading using already defined crud helpers --- .../class-wc-meta-box-product-images.php | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-images.php b/includes/admin/meta-boxes/class-wc-meta-box-product-images.php index 7f63034ca47..f3b788a09b9 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-images.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-images.php @@ -25,20 +25,18 @@ class WC_Meta_Box_Product_Images { * @param WP_Post $post */ public static function output( $post ) { + global $thepostid, $product_object; + + $thepostid = $post->ID; + $product_object = $thepostid ? wc_get_product( $thepostid ) : new WC_Product; + wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' ); ?>