Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Clayton R

    (@mrclayton)

    Hi @contemplate

    Thank you for contacting Payment Plugins. We will be updating the $4,000 limit for USD in the next release. In the interim, you can use filter wc_stripe_afterpay_get_required_parameters to modify the parameters. Here is an example:

    add_filter('wc_stripe_afterpay_get_required_parameters', function($args){
    $args['USD'][2] = 4000;
    return $args;
    });

    Kind Regards,

    Thread Starter contemplate

    (@contemplate)

    Thanks @mrclayton

    I had to wrap this in a plugins_loaded action to get it to work in our snippets plugin but I’m all good now.

    // Raise Afterpay/Clearpay max for USD to $4,000
    add_action( 'plugins_loaded', function () {
    add_filter( 'wc_stripe_afterpay_get_required_parameters', function( $params, $gateway ) {

    if ( isset( $params['USD'] ) && is_array( $params['USD'] ) ) {
    // Structure is ['US', 1, 2000] -> country, min, max
    $params['USD'][2] = 4000;
    }

    return $params;

    }, 10, 2 );
    }, 20 );
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.