Skip to content

Commit

Permalink
fix: deprecate Salesforce
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Nov 27, 2024
1 parent 9c9c1c8 commit c1e5ae7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions includes/wizards/audience/class-audience-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ public function enqueue_scripts_and_styles() {
return;
}
parent::enqueue_scripts_and_styles();
$salesforce_settings = Salesforce::get_salesforce_settings();
$data = [
'has_memberships' => class_exists( 'WC_Memberships' ),
'reader_activation_url' => admin_url( 'admin.php?page=newspack-audience#/' ),
'esp_metadata_fields' => Reader_Activation\Sync\Metadata::get_default_fields(),
'can_use_salesforce' => ! empty( $salesforce_settings['client_id'] ),
'salesforce_redirect_url' => Salesforce::get_redirect_url(),
];

Expand Down
3 changes: 0 additions & 3 deletions src/components/src/handoff-message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ export default function HandoffMessage() {
setHandoffMessage( false );
}
}, 100 );

// Clean up the notification when unmounting.
return () => window.localStorage.removeItem( HANDOFF_KEY );
}, [] );
if ( ! handoffMessage ) {
return null;
Expand Down
8 changes: 6 additions & 2 deletions src/wizards/audience/views/setup/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,12 @@ export default withWizardScreen( ( { config, fetchConfig, updateConfig, saveConf
) }
</Button>
</div>
<hr />
<Salesforce />
{ newspackAudience.can_use_salesforce && (
<>
<hr />
<Salesforce />
</>
) }
</Card>
) }
</WizardsTab>
Expand Down

0 comments on commit c1e5ae7

Please sign in to comment.