diff --git a/includes/wizards/audience/class-audience-donations.php b/includes/wizards/audience/class-audience-donations.php index c5405283d4..256bcee0b5 100644 --- a/includes/wizards/audience/class-audience-donations.php +++ b/includes/wizards/audience/class-audience-donations.php @@ -7,6 +7,8 @@ namespace Newspack; +use WP_Error; + defined( 'ABSPATH' ) || exit; /** @@ -231,10 +233,7 @@ public function update_donation_settings( $settings ) { * @return Array */ public function fetch_all_data() { - $platform = Donations::get_platform_slug(); - $wc_configuration_manager = Configuration_Managers::configuration_manager_class_for_plugin_slug( 'woocommerce' ); - $wc_installed = 'active' === Plugin_Manager::get_managed_plugin_status( 'woocommerce' ); - $stripe_data = Stripe_Connection::get_stripe_data(); + $platform = Donations::get_platform_slug(); $args = [ 'platform_data' => [ diff --git a/includes/wizards/audience/class-audience-wizard.php b/includes/wizards/audience/class-audience-wizard.php index 4cd744c2c9..c7fc502714 100644 --- a/includes/wizards/audience/class-audience-wizard.php +++ b/includes/wizards/audience/class-audience-wizard.php @@ -611,7 +611,6 @@ public function api_update_woopayments_settings( $request ) { public function get_payment_data() { $platform = Donations::get_platform_slug(); $wc_configuration_manager = Configuration_Managers::configuration_manager_class_for_plugin_slug( 'woocommerce' ); - $wc_installed = 'active' === Plugin_Manager::get_managed_plugin_status( 'woocommerce' ); $stripe_data = Stripe_Connection::get_stripe_data(); $args = [ diff --git a/src/wizards/audience/components/salesforce/index.js b/src/wizards/audience/components/salesforce/index.js index 84d2a2a241..111c6ff9d4 100644 --- a/src/wizards/audience/components/salesforce/index.js +++ b/src/wizards/audience/components/salesforce/index.js @@ -18,7 +18,7 @@ import { addQueryArgs } from '@wordpress/url'; import { PluginSettings, Notice, Wizard } from '../../../../components/src'; const Salesforce = () => { - const { salesforce_redirect_url: redirectUrl } = window?.newspackAudienceDonations || {}; + const { salesforce_redirect_url: redirectUrl } = window?.newspackAudience || {}; const [ hasCopied, setHasCopied ] = useState( false ); const salesforceData = Wizard.useWizardData( 'newspack-audience/salesforce' ); const [ isConnected, setIsConnected ] = useState( salesforceData.refresh_token ); diff --git a/src/wizards/audience/views/donations/index.js b/src/wizards/audience/views/donations/index.js index 9d2488edbe..c14a9fc5fc 100644 --- a/src/wizards/audience/views/donations/index.js +++ b/src/wizards/audience/views/donations/index.js @@ -19,7 +19,7 @@ import Revenue from './revenue'; import { AUDIENCE_DONATIONS_WIZARD_SLUG, NEWSPACK, OTHER } from '../../constants'; const AudienceDonations = () => { - const { platform_data, donation_data } = Wizard.useWizardData( 'newspack-audience-donations' ); + const { platform_data, donation_data } = Wizard.useWizardData( AUDIENCE_DONATIONS_WIZARD_SLUG ); const usedPlatform = platform_data?.platform; const sections = [ {