Home / eCommerce / Allow mixed cart support with Stripe Payment Elements
Duplicate Snippet

Embed Snippet on Your Site

Allow mixed cart support with Stripe Payment Elements

Make it possible to purchase a subscription and non-subscription product in the same transaction with Stripe's Payment Elements. Requires EDD 3.2.7.

Code Preview
php
<?php
add_filter( 'edd_gateway_supports', 'prefix_maybe_add_mixed_cart_support', 999, 2 );
/**
 * Allow Stripe to support mixed carts.
 * Requires EDD 3.2.7.
 */
function prefix_maybe_add_mixed_cart_support( $supports, $gateway ) {
	if ( 'stripe' === $gateway ) {
		$supports[] = 'mixed_cart';
	}
	return $supports;
}

Comments

Add a Comment