Skip to content

Instantly share code, notes, and snippets.

@kenmasters
Last active June 30, 2019 21:03
Show Gist options
  • Save kenmasters/7a305cd91b8e6bea067de0ababb71fa0 to your computer and use it in GitHub Desktop.
Save kenmasters/7a305cd91b8e6bea067de0ababb71fa0 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