Skip to content

Instantly share code, notes, and snippets.

@unaibamir
Created March 18, 2017 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unaibamir/3101f12cd092a395148e35b9ffb03a8e to your computer and use it in GitHub Desktop.
Save unaibamir/3101f12cd092a395148e35b9ffb03a8e to your computer and use it in GitHub Desktop.
add_action( 'gform_after_submission_1', 'post_to_third_party', 10, 2 );
function post_to_third_party( $entry, $form ) {
global $post;
$pro_id = get_field( "product_id" );
if($pro_id != '') {
$post_url = 'http://www.brooks21.com/cart/?add-to-cart='.$pro_id;
wp_redirect( $post_url );
exit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment