From e3994348b320d6d4ac137d4e6b27ccb0bbfca2e6 Mon Sep 17 00:00:00 2001 From: Gerhard Potgieter Date: Mon, 10 Sep 2018 11:31:24 +0200 Subject: [PATCH] Update checked functionality to use a filter, removed option from settings screen. Can use the woocommerce_restock_refunded_items filter to have the option checked or not, defaults to unchecked. --- includes/admin/meta-boxes/views/html-order-items.php | 8 +++++--- includes/admin/settings/class-wc-settings-products.php | 8 -------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/includes/admin/meta-boxes/views/html-order-items.php b/includes/admin/meta-boxes/views/html-order-items.php index 445c08a2717..77379b2b666 100644 --- a/includes/admin/meta-boxes/views/html-order-items.php +++ b/includes/admin/meta-boxes/views/html-order-items.php @@ -254,11 +254,13 @@ if ( wc_tax_enabled() ) { - /> + /> diff --git a/includes/admin/settings/class-wc-settings-products.php b/includes/admin/settings/class-wc-settings-products.php index 0913511ce54..14f92cfae37 100644 --- a/includes/admin/settings/class-wc-settings-products.php +++ b/includes/admin/settings/class-wc-settings-products.php @@ -139,14 +139,6 @@ class WC_Settings_Products extends WC_Settings_Page { 'type' => 'checkbox', ), - array( - 'title' => __( 'Restock refunded items', 'woocommerce' ), - 'desc' => __( 'Uncheck this to default to NOT restocking items when refunding', 'woocommerce' ), - 'id' => 'woocommerce_restock_refunded_items', - 'default' => 'yes', - 'type' => 'checkbox', - ), - array( 'title' => __( 'Hold stock (minutes)', 'woocommerce' ), 'desc' => __( 'Hold stock (for unpaid orders) for x minutes. When this limit is reached, the pending order will be cancelled. Leave blank to disable.', 'woocommerce' ),