Addressing feedback. Removed `!important` from `.addons-button-expandable` rule. Renamed `geowhitelist` and `geoblacklist` to `geo_allow_list` and `geo_block_list`.

This commit is contained in:
And Finally 2021-05-12 09:41:31 +01:00
parent e4d3b157ff
commit de331ad893
2 changed files with 5 additions and 5 deletions

View File

@ -404,7 +404,7 @@
.addons-button-expandable {
display: inline-block;
padding: 0 16px;
width: auto !important;
width: auto;
}
.addons-button-solid:hover {

View File

@ -549,8 +549,8 @@ class WC_Admin_Addons {
$section_object = (object) $section;
if ( ! empty( $section_object->geowhitelist ) ) {
$section_object->geowhitelist = explode( ',', $section_object->geowhitelist );
if ( ! empty( $section_object->geo_allow_list ) ) {
$section_object->geo_allow_list = explode( ',', $section_object->geo_allow_list );
}
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->geowhitelist ) && ! in_array( $location, $item->geowhitelist, true ) ) {
if ( isset( $item->geo_allow_list ) && ! in_array( $location, $item->geo_allow_list, true ) ) {
return false;
}
if ( isset( $item->geoblacklist ) && in_array( $location, $item->geoblacklist, true ) ) {
if ( isset( $item->geo_block_list ) && in_array( $location, $item->geo_block_list, true ) ) {
return false;
}