Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Payment Custom Amount

$
0
0

Replies: 0

Hello,

I can’t seems to change button’s amount dynamically.

Following the filter example from https://newo.me/direct-stripe-actions-and-filters-hooks/ does work with ‘current_email_address’ but not with ‘amount’ :

add_filter( ‘ds_filter_params’, function( $params ){
$amount = base64_encode(50);
if( isset($amount) ){
$params[‘amount’] = $amount;
}
return $params;
} );

I thought, names from the var ds**** array could be used. Also tried ‘original_amount’ with no success.

Is this possible ?

cheers,

EDIT : just created full custom button shortcode

  • This topic was modified 7 minutes ago by jrm7.

Viewing all articles
Browse latest Browse all 59525

Trending Articles