Skip to content

Charitable Stripe 1.4 Upgrade Notes

If you are updating to Charitable Stripe 1.4 from a previous version, there are some changes you should be aware of, particularly if you are using code to customize the plugin’s behaviour.

Things that were removed

charitable_stripe_charge_args filter

The charitable_stripe_charge_args filter was removed in 1.4. In our experience, there were two key ways this filter was used:

To change the statement descriptor.

The statement descriptor can now be customized via the Stripe settings page. Go to Charitable > Settings > Payment Gateways > Stripe and set “Format” to “Set a custom statement descriptor”, then specify your custom statement descriptor in the setting below.

If you would want your statement descriptor to be dynamic (i.e. not the same for every donation), you can use the charitable_stripe_statement_descriptor filter.

To change the metadata that is sent to Stripe.

Changing the metadata can now be done with one of two filters.

Classes

Two classes were removed entirely:

  • Charitable_Stripe_Gateway_Processor_One_Time
  • Charitable_Stripe_Gateway_Processor_Recurring

Both of these classes are no longer required, as the new Charitable_Stripe_Gateway_Processor_Checkout and Charitable_Stripe_Gateway_Processor_Payment_Intents classes now handle all gateway processing.

Filters

Some filters were removed:

  • charitable_stripe_gateway_processor_recurring
  • charitable_stripe_gateway_processor_one_time
  • charitable_stripe_donation_status
  • charitable_stripe_charge_args (replacements mentioned above)

Methods

Some class methods were removed:

  • Charitable_Gateway_Stripe::add_hidden_token_field() was removed and replaced by Charitable_Gateway_Stripe::add_hidden_stripe_account_field().
  • Charitable_Gateway_Stripe::set_submitted_stripe_token() was removed without replacement.
  • Charitable_Gateway_Stripe::redirect_to_donation_form() was removed without replacement.
  • Charitable_Gateway_Stripe::process_donation_legacy() was removed without replacement.

Things that were deprecated

The following methods were deprecated and will be removed in a future version:

  • Charitable_Stripe_Gateway_Processor::create_stripe_customer()
  • Charitable_Stripe_Gateway_Processor::get_saved_stripe_customer_id()
  • Charitable_Stripe_Gateway_Processor::save_stripe_customer_id()
  • Charitable_Stripe_Gateway_Processor::get_stripe_customer_object
  • Charitable_Stripe_Gateway_Processor::get_stripe_customer_card_id()
  • Charitable_Gateway_Stripe::enqueue_scripts()
  • Charitable_Gateway_Stripe::maybe_setup_scripts_in_donation_form()
  • Charitable_Gateway_Stripe::maybe_setup_scripts_in_campaign_loop()
  • Charitable_Gateway_Stripe::require_credit_card_details()
  • Charitable_Gateway_Stripe::validate_donation()

In addition, some class properties were deprecated:

  • Charitable_Stripe_Webhook_Processor::stripe_event