Skip to content

Commit

Permalink
refactor: changed naming to match woocommerce checks in different PR
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Sep 11, 2024
1 parent 36601be commit 9edfb08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/js/src/redux/reducers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function getDefaultState() {
useTwitterData: window.wpseoScriptData.metabox.showSocial.twitter,
isWincherIntegrationActive: isWincherIntegrationActive(),
isInsightsEnabled: get( window, "wpseoScriptData.metabox.isInsightsEnabled", false ),
isNewsEnabled: get( window, "wpseoScriptData.metabox.isNewsSEOActive", false ),
isNewsEnabled: get( window, "wpseoScriptData.metabox.isNewsSeoActive", false ),
isAiFeatureActive: Boolean( window.wpseoAdminL10n.isAiFeatureActive ),
};
}
Expand Down
10 changes: 6 additions & 4 deletions src/editors/framework/integrations/news-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ class News_SEO implements Integration_Data_Provider_Interface {

/**
* The constructor.
*
* @param WPSEO_Addon_Manager $addon_manager The addon manager.
*/
public function __construct() {
$this->addon_manager = new WPSEO_Addon_Manager();
public function __construct( WPSEO_Addon_Manager $addon_manager ) {
$this->addon_manager = $addon_manager;
}

/**
Expand All @@ -39,7 +41,7 @@ public function is_enabled(): bool {
* @return array<string,bool> Returns the name and if the feature is enabled.
*/
public function to_array(): array {
return [ 'isNewsSEOActive' => $this->is_enabled() ];
return [ 'isNewsSeoActive' => $this->is_enabled() ];
}

/**
Expand All @@ -48,6 +50,6 @@ public function to_array(): array {
* @return array<string,bool> Returns the legacy key and if the feature is enabled.
*/
public function to_legacy_array(): array {
return [ 'isNewsSEOActive' => $this->is_enabled() ];
return [ 'isNewsSeoActive' => $this->is_enabled() ];
}
}

0 comments on commit 9edfb08

Please sign in to comment.