From 6bb1ec73a4757cf38ddb1893a06515ccb6263b57 Mon Sep 17 00:00:00 2001 From: And Finally Date: Wed, 12 May 2021 17:48:37 +0100 Subject: [PATCH] Reverted renaming of `geowhitelist` and `geoblacklist`, in case they are still present in other endpoints. --- includes/admin/class-wc-admin-addons.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/admin/class-wc-admin-addons.php b/includes/admin/class-wc-admin-addons.php index fafe07d5ce7..e90ac2ad9a8 100644 --- a/includes/admin/class-wc-admin-addons.php +++ b/includes/admin/class-wc-admin-addons.php @@ -549,8 +549,8 @@ class WC_Admin_Addons { $section_object = (object) $section; - if ( ! empty( $section_object->geo_allow_list ) ) { - $section_object->geo_allow_list = explode( ',', $section_object->geo_allow_list ); + if ( ! empty( $section_object->geowhitelist ) ) { + $section_object->geowhitelist = explode( ',', $section_object->geowhitelist ); } if ( ! self::show_extension( $section_object ) ) { @@ -788,11 +788,11 @@ class WC_Admin_Addons { */ public static function show_extension( $item ) { $location = WC()->countries->get_base_country(); - if ( isset( $item->geo_allow_list ) && ! in_array( $location, $item->geo_allow_list, true ) ) { + if ( isset( $item->geowhitelist ) && ! in_array( $location, $item->geowhitelist, true ) ) { return false; } - if ( isset( $item->geo_block_list ) && in_array( $location, $item->geo_block_list, true ) ) { + if ( isset( $item->geoblacklist ) && in_array( $location, $item->geoblacklist, true ) ) { return false; }