Reverted renaming of `geowhitelist` and `geoblacklist`, in case they are still present in other endpoints.

This commit is contained in:
And Finally 2021-05-12 17:48:37 +01:00
parent de331ad893
commit 6bb1ec73a4
1 changed files with 4 additions and 4 deletions

View File

@ -549,8 +549,8 @@ class WC_Admin_Addons {
$section_object = (object) $section; $section_object = (object) $section;
if ( ! empty( $section_object->geo_allow_list ) ) { if ( ! empty( $section_object->geowhitelist ) ) {
$section_object->geo_allow_list = explode( ',', $section_object->geo_allow_list ); $section_object->geowhitelist = explode( ',', $section_object->geowhitelist );
} }
if ( ! self::show_extension( $section_object ) ) { if ( ! self::show_extension( $section_object ) ) {
@ -788,11 +788,11 @@ class WC_Admin_Addons {
*/ */
public static function show_extension( $item ) { public static function show_extension( $item ) {
$location = WC()->countries->get_base_country(); $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; 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; return false;
} }