From 47baf952e685c3cadf028240c444ef643eb3ce83 Mon Sep 17 00:00:00 2001 From: tamarazuk Date: Sun, 27 Apr 2014 16:18:58 -0400 Subject: [PATCH 1/2] Add action filter in inventory product data Allows plugins to add meta fields after stock status/backorders even if woocommerce_manage_stock is turned off. --- .../post-types/meta-boxes/class-wc-meta-box-product-data.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php index 1b0def515c8..d4d46b334a9 100644 --- a/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php @@ -317,7 +317,9 @@ class WC_Meta_Box_Product_Data { echo ''; } - + + do_action('woocommerce_product_options_stock_status'); + echo ''; echo '
'; From 44d197cde0b1bf71aaa5bf2e7635c98d567ba161 Mon Sep 17 00:00:00 2001 From: tamarazuk Date: Sun, 27 Apr 2014 19:25:07 -0400 Subject: [PATCH 2/2] Another action hook in Inventory product data tab allow plugins to create a new options_group in this tab --- .../post-types/meta-boxes/class-wc-meta-box-product-data.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php index d4d46b334a9..18399d03f7f 100644 --- a/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/post-types/meta-boxes/class-wc-meta-box-product-data.php @@ -330,7 +330,8 @@ class WC_Meta_Box_Product_Data { do_action('woocommerce_product_options_sold_individually'); echo '
'; - + + do_action( 'woocommerce_product_options_inventory_product_data' ); ?>