Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

Hook $vars show just 1 with print_r ?

$
0
0
Hi,

having a hardtime getting a list of all available vars from the hook for order creation http://docs.whmcs.com/Hooks:Order_Process.

Here is the code, I've tried different methods and always same result all I get is "1" which is not helpful for the email debug. Does anyone have any debug code that works and shows the variables? HELP :?:

Code:

function create_free_trial($vars) {

$to = "kjavitz@gmail.com";
    $subject = "Hello, i'm the hook!";
    $varsemail = print_r($vars);
    $message = $varsemail;
    $from = "kjavitz@gmail.com";
    $headers = "From:" . $from;
    mail($to,$subject,$message,$headers);

}

add_hook("AfterShoppingCartCheckout",1,"create_free_trial");


Viewing all articles
Browse latest Browse all 13458

Trending Articles