I'm tapping into the subscription action hook scheduled_subscription_payment
.
function subscription_renewal($arg) {
echo, '<pre>' print_r($arg, true);
}
add_action( 'scheduled_subscription_payment', 'subscription_renewal' );
Its only returning the user id of the subscriber and I've also tried multiple arguments. I want all the order (subscription) information but cannot find another method to do so. Does this method pass anything but the user id or is there another method?
This action does pass in two parameters, user_id and the subscription_key. You need to specify that the function takes two arguments, and you need to also specify that your action processes two arguments: