From 75baccd1548b15dd12ae090d277999398bb2846d Mon Sep 17 00:00:00 2001 From: Alda Vigdis Skarphedinsdottir Date: Wed, 7 Aug 2024 01:12:03 +0200 Subject: [PATCH] Bugfix: Some options were not being saved (#191) --- js/admin.js | 2 ++ src/Config.php | 4 ++-- views/admin.php | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/js/admin.js b/js/admin.js index 1cf29cb..2a402f0 100644 --- a/js/admin.js +++ b/js/admin.js @@ -90,6 +90,8 @@ class NineteenEightyWoo { make_credit_invoice: Boolean( formData.get( 'make_credit_invoice' ) ), domestic_customer_ledger_code: formData.get( 'domestic_customer_ledger_code' ), international_customer_ledger_code: formData.get( 'international_customer_ledger_code' ), + use_attribute_description: Boolean( formData.get( 'use_attribute_description' ) ), + use_attribute_value_description: Boolean( formData.get( 'use_attribute_value_description' ) ), product_convertion_to_variation_enabled: Boolean( formData.get( 'product_conversion' ) ), fetch_products: true } diff --git a/src/Config.php b/src/Config.php index 4d5be1b..df443d6 100644 --- a/src/Config.php +++ b/src/Config.php @@ -746,7 +746,7 @@ public static function get_use_attribute_description(): bool { public static function set_use_attribute_description( bool $value ): bool { return update_option( '1984_woo_dk_use_attribute_description', - (bool) $value + (int) $value ); } @@ -776,7 +776,7 @@ public static function set_use_attribute_value_description( ): bool { return update_option( '1984_woo_dk_use_attribute_value_description', - (bool) $value + (int) $value ); } diff --git a/views/admin.php b/views/admin.php index 0d5103d..24f9709 100644 --- a/views/admin.php +++ b/views/admin.php @@ -185,7 +185,7 @@ class="regular-text api-key-input" /> @@ -208,7 +208,7 @@ class="regular-text api-key-input" />