It worked for me, somewhat. I am unable to choose only 1 of my 2 forms. I am not proficient with PHP so in the two places it wanted form numbers I tried each one individually, and all combinations of both. If I don’t keep both form numbers I get the following warning…
Warning: Missing argument 2 for my_action_url_ssl() in path/functions.php on line 6
Here is the working code, though I’m only wanting the paypal URL on form 2.
function my_action_url_ssl($form_action_url, $form_id_num) {
##################################
// control which forms you want this on
$all_forms = false; // set to true for process on all forms, or false to use settings below
$forms = array('1', '2'); // one or more individual forms
##################################
if ( !in_array($form_id_num, $forms) && $all_forms != true)
return $form_action_url;
// force form action URL to be SSL
$form_action_url = 'https://www.paypal.com/cgi-bin/webscr';
return $form_action_url;
}
//filter hook for form action URL
add_filter('si_contact_form_action_url', 'my_action_url_ssl', 1, 2);