2 added 708 characters in body; added 46 characters in body; edited body
source | link

Thanks to Rarst this makes a hell of a lot more sense now. So I've updated this post to elaborate the differences Rarst mentioned and upvoted his for shedding light on this ; )

Basically Hacky solution:wp_schedule_single_event passes the arguments to your function through the variable args as shown in the codex. This variable "args" must be an array because each value in the array will be mapped to an argument in your call back function.

Example:

add_action('example_action', 'example', 1, 3);
$args = array(array('email' =>( $email2, 'title'1, =>3 $post->post_title);
wp_schedule_single_event(time(), 'example_action', $args);

function example($a, $b, $c)
{

}

I hit the same problem. Very annoying2 will go to $a, 1 will go to $b and 3 will go to $c. ThisHowever passing three variables is what I discovered:only possible because of this line,

$argsadd_action('example_action', ='example', array($email1, 3);

Will work properly and $email will beLooking at the codex for add_action you see that the fourth argument, 3, is what controls how many arguments are passed as a non-array variable to $args,the call back function. The default is 1.

So this example also works:

functionadd_action('example_action', email_about_coupon'example');
$args = array ( array( 2, 1, 3 ) );
wp_schedule_single_event(time(), 'example_action', $args);

function example($a)
{

}

If you try and use TWO or more values inSo here the array then it breaks( 2, 1, 3) is assigned to just $a. 

So this doesn't workSardine's issue could be resolved with one line change where line 7,

$args = array('email' => $email, 'title' => $post->post_title);

So in the end the conclusion was, if one variable works then turn that variable into an array.

As a side note I also tried to change the function tobecomes this instead,

function$args email_about_coupon= array($args1array('email' => $email, $args2'title' => $post->post_title));

But sadly that did nothing and actually may have made things worse. I think this is a bug with wp_schedule_single_event as I'm having issues with the EXACT same function. Fortunately this hack will work even if they fix the bug.

Hacky solution:

$args = array(array('email' => $email, 'title' => $post->post_title));

I hit the same problem. Very annoying. This is what I discovered:

$args = array($email);

Will work properly and $email will be passed as a non-array variable to $args,

function email_about_coupon($args)

If you try and use TWO or more values in the array then it breaks. So this doesn't work,

$args = array('email' => $email, 'title' => $post->post_title);

So in the end the conclusion was, if one variable works then turn that variable into an array.

As a side note I also tried to change the function to this,

function email_about_coupon($args1, $args2)

But sadly that did nothing and actually may have made things worse. I think this is a bug with wp_schedule_single_event as I'm having issues with the EXACT same function. Fortunately this hack will work even if they fix the bug.

Thanks to Rarst this makes a hell of a lot more sense now. So I've updated this post to elaborate the differences Rarst mentioned and upvoted his for shedding light on this ; )

Basically wp_schedule_single_event passes the arguments to your function through the variable args as shown in the codex. This variable "args" must be an array because each value in the array will be mapped to an argument in your call back function.

Example:

add_action('example_action', 'example', 1, 3);
$args = array ( 2, 1, 3 );
wp_schedule_single_event(time(), 'example_action', $args);

function example($a, $b, $c)
{

}

2 will go to $a, 1 will go to $b and 3 will go to $c. However passing three variables is only possible because of this line,

add_action('example_action', 'example', 1, 3);

Looking at the codex for add_action you see that the fourth argument, 3, is what controls how many arguments are passed to the call back function. The default is 1.

So this example also works:

add_action('example_action', 'example');
$args = array ( array( 2, 1, 3 ) );
wp_schedule_single_event(time(), 'example_action', $args);

function example($a)
{

}

So here the array( 2, 1, 3) is assigned to just $a. 

So Sardine's issue could be resolved with one line change where line 7,

$args = array('email' => $email, 'title' => $post->post_title);

becomes this instead,

$args = array(array('email' => $email, 'title' => $post->post_title));
1
source | link

Hacky solution:

$args = array(array('email' => $email, 'title' => $post->post_title));

I hit the same problem. Very annoying. This is what I discovered:

$args = array($email);

Will work properly and $email will be passed as a non-array variable to $args,

function email_about_coupon($args)

If you try and use TWO or more values in the array then it breaks. So this doesn't work,

$args = array('email' => $email, 'title' => $post->post_title);

So in the end the conclusion was, if one variable works then turn that variable into an array.

As a side note I also tried to change the function to this,

function email_about_coupon($args1, $args2)

But sadly that did nothing and actually may have made things worse. I think this is a bug with wp_schedule_single_event as I'm having issues with the EXACT same function. Fortunately this hack will work even if they fix the bug.