Fix Google Listings plugin is always shown in free features despite already activated (https://github.com/woocommerce/woocommerce-admin/pull/8330)

* Add is_visible rule for google-listings-and-ads to not display it if it's already activated

* Add changelog
This commit is contained in:
Chi-Hsuan Huang 2022-02-21 17:46:25 +08:00 committed by GitHub
parent dd4736cc5c
commit 9c49667dde
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: Fix
Fix Google Listings plugin is always shown in free features despite already activated. #8330

View File

@ -79,6 +79,17 @@ class DefaultFreeExtensions {
'image_url' => plugins_url( 'images/onboarding/google-listings-and-ads.png', WC_ADMIN_PLUGIN_FILE ),
'manage_url' => 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart',
'is_built_by_wc' => true,
'is_visible' => [
[
'type' => 'not',
'operand' => [
[
'type' => 'plugins_activated',
'plugins' => [ 'google-listings-and-ads' ],
],
],
],
],
],
'google-listings-and-ads:alt' => [
'name' => __( 'Google Listings & Ads', 'woocommerce-admin' ),