1. I want to hook into the e-mail hook ‘ims_customer_message’ and add some text to the e-mail sent to the customer.
I have a plug-in with the following code:
add_filter(‘ims_customer_message’,’jch_test_function’ );
function jch_test_function($message)
{
return $message . ‘ Thanks for ordering.’;
}
This doesn’t do anything. What am I doing wrong?
2. Same hook. I want to be able to access the object which holds the contents of the public $cart (line item info) array. How can I pass that to my add_filter function?
add_filter(‘ims_customer_message’,’jch_test_function’ );
function jch_test_function($message, $cart)
// I’m sure this is wrong… just for example.
{
var_dump($cart);
return $message . $cart;
}
TIA,
—JC