Skip to content

Commit

Permalink
fix: remove unused code and minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Nov 28, 2024
1 parent c1e5ae7 commit 8b92d15
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions includes/wizards/audience/class-audience-donations.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace Newspack;

use WP_Error;

defined( 'ABSPATH' ) || exit;

/**
Expand Down Expand Up @@ -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' => [
Expand Down
1 change: 0 additions & 1 deletion includes/wizards/audience/class-audience-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/wizards/audience/components/salesforce/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/wizards/audience/views/donations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down

0 comments on commit 8b92d15

Please sign in to comment.