Cherry pick 51664 into release/9.4 (#51849)
* Add core feature for site visibility badge (#51664)
* Add site_visibility_badge feature
* Update feature check on badge
Previously the WooCommerce Admin LYS feature flag was used, however this is slated to be removed in an upcoming release. This is updated to use the core level feature flag for the badge.
* Add changelog
* Fix lint issues
* Revert "Fix lint issues"
This reverts commit cf05d2b74f
.
* Lint fixes
* lint
* Prep for cherry pick 51664
---------
Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
This commit is contained in:
parent
135f6c9389
commit
820cb1c308
|
@ -220,6 +220,7 @@ WooCommerce comes with some sample data you can use to see how products look; im
|
|||
* Fix - Use `get_filtered_ids` consistently in `reports/taxes` and `reports/taxes/stats` datastores [#51219](https://github.com/woocommerce/woocommerce/pull/51219)
|
||||
* Fix - wc_get_cart_url should only return current URL if on the cart page. This excludes the usage of WOOCOMMERCE_CART. [#51384](https://github.com/woocommerce/woocommerce/pull/51384)
|
||||
* Fix - Wrap parse_str under a check to resolve deprecation notice [#51474](https://github.com/woocommerce/woocommerce/pull/51474)
|
||||
* Add - Add core feature for site visibility badge [#51664](https://github.com/woocommerce/woocommerce/pull/51664)
|
||||
* Add - Added a Load More button to product lists on the Extensions page, to request additional search results from WooCommerce.com. [#51413](https://github.com/woocommerce/woocommerce/pull/51413)
|
||||
* Add - Add endpoint title to the document title. [#50900](https://github.com/woocommerce/woocommerce/pull/50900)
|
||||
* Add - Add global_unique_id parameter to products REST API [#51264](https://github.com/woocommerce/woocommerce/pull/51264)
|
||||
|
|
|
@ -4,7 +4,8 @@ declare( strict_types = 1 );
|
|||
|
||||
namespace Automattic\WooCommerce\Internal\ComingSoon;
|
||||
|
||||
use Automattic\WooCommerce\Admin\Features\Features;
|
||||
use Automattic\WooCommerce\Utilities\FeaturesUtil;
|
||||
|
||||
|
||||
/**
|
||||
* Adds hooks to add a badge to the WordPress admin bar showing site visibility.
|
||||
|
@ -30,7 +31,7 @@ class ComingSoonAdminBarBadge {
|
|||
*/
|
||||
public function site_visibility_badge( $wp_admin_bar ) {
|
||||
// Early exit if LYS feature is disabled.
|
||||
if ( ! Features::is_enabled( 'launch-your-store' ) ) {
|
||||
if ( ! FeaturesUtil::feature_is_enabled( 'site_visibility_badge' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -68,7 +69,7 @@ class ComingSoonAdminBarBadge {
|
|||
*/
|
||||
public function output_css() {
|
||||
// Early exit if LYS feature is disabled.
|
||||
if ( ! Features::is_enabled( 'launch-your-store' ) ) {
|
||||
if ( ! FeaturesUtil::feature_is_enabled( 'site_visibility_badge' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -224,6 +224,18 @@ class FeaturesController {
|
|||
'is_legacy' => true,
|
||||
'is_experimental' => false,
|
||||
),
|
||||
'site_visibility_badge' => array(
|
||||
'name' => __( 'Site visibility badge', 'woocommerce' ),
|
||||
'description' => __(
|
||||
'Enable the site visibility badge in the WordPress admin bar',
|
||||
'woocommerce'
|
||||
),
|
||||
'enabled_by_default' => true,
|
||||
'disable_ui' => false,
|
||||
'is_legacy' => true,
|
||||
'is_experimental' => false,
|
||||
'disabled' => false,
|
||||
),
|
||||
'hpos_fts_indexes' => array(
|
||||
'name' => __( 'HPOS Full text search indexes', 'woocommerce' ),
|
||||
'description' => __(
|
||||
|
|
Loading…
Reference in New Issue