Skip to content

Instantly share code, notes, and snippets.

@pije76
Forked from kenmasters/GFORM: Change Currency
Created June 30, 2019 21:03
Show Gist options
  • Save pije76/59a169f3eb69cc8c23e3573873d556f9 to your computer and use it in GitHub Desktop.
Save pije76/59a169f3eb69cc8c23e3573873d556f9 to your computer and use it in GitHub Desktop.
Gravity Forms PayPal Standard Add-On
/**
* Change payment currency base from another field, when specific form is submitted.
*/
add_action( 'gform_pre_submission_2', 'change_currency_' );
function change_currency_( $form ) {
add_filter( 'gform_currency', function() { return rgpost('input_4'); } );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment