Skip to content

Commit

Permalink
Hide license link on Social admin page of WoA sites
Browse files Browse the repository at this point in the history
  • Loading branch information
p-jackson committed Jan 15, 2025
1 parent 4f7022d commit ee9ed01
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

License: Social admin page header hides license link on WoA sites.
1 change: 1 addition & 0 deletions projects/js-packages/publicize-components/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ export interface SocialScriptData {
store_initial_state: SocialStoreState;
supported_services: Array< ConnectionService >;
urls: SocialUrls;
is_woa_site: boolean;
}
4 changes: 4 additions & 0 deletions projects/packages/publicize/changelog/hide-license-on-woa
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

License: Social admin page header hides license link on WoA sites.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public static function get_admin_script_data() {
'shares_data' => array(),
'urls' => array(),
'settings' => self::get_social_settings(),
'is_woa_site' => ( new Host() )->is_woa_site(),
);

if ( ! Utils::is_publicize_active() ) {
Expand Down
4 changes: 4 additions & 0 deletions projects/plugins/social/changelog/hide-license-on-woa
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

License: Social admin page header hides license link on WoA sites.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import styles from './styles.module.scss';

const AdminPageHeader = () => {
const activateLicenseUrl = getMyJetpackUrl( '#/add-license' );
const isWoaSite = Boolean( window.JetpackScriptData?.social?.is_woa_site );

return (
<div className={ styles.header }>
<span className={ styles.logo }>
<Logo />
</span>

{ ! hasSocialPaidFeatures() && (
{ ! hasSocialPaidFeatures() && ! isWoaSite && (
<p>
{ createInterpolateElement(
__(
Expand Down

0 comments on commit ee9ed01

Please sign in to comment.