Home / Disable / Hotfix: Remove Stripe Statement Descriptor
Duplicate Snippet

Embed Snippet on Your Site

Hotfix: Remove Stripe Statement Descriptor

In EDD 3.2.8, Easy Digital Downloads changed how Statement Descriptors are used with Stripe Payments to comply with recent changes in their API. It is recommended that you update to version 3.2.8 of Easy Digital Downloads to ensure payments are not interrupted.

Further Information: https://easydigitaldownloads.com/docs/stripe/#descriptor
In February of 2024, Stripe made some changes to the way that the Statement Descriptor is used when creating PaymentIntents. This has resulted in some accounts not being able to process card payments due to their account having these changes applied. With these changes, Stripe will use the Statement Descriptor defined within your Stripe account.

Code Preview
php
<?php
/**
 * Ensures that a Statement Descriptor is not sent to the Stripe PaymentIntent creation process.
 * 
 * This is a HOTFIX and is not intended for long-term use. We recommend updating to Easy Digital Downloads 3.2.8+
 * 
 * This is to make sure that your site is compatible with Stripe's latest changes to their API.
 * 
 * @see https://easydigitaldownloads.com/docs/stripe/#descriptor
 */
function eddwp_remove_statement_descriptor_for_stripe( $intent_args, $purchase_data ) {
    unset( $intent_args['statement_descriptor'];
    return $intent_args;
}
add_filter( 'edds_create_payment_intent_args', 'eddwp_remove_statement_descriptor_for_stripe', 10, 2 );

Comments

Add a Comment