This hook is triggered after payment successfully completed for an order. You may use the hook to send custom instructions for the purchased products to your customer or send a custom order notification email to any email addresses.
A registered action function is passed the following parameters.
$order_id
The ID of the order just completed
<?php add_action("wpdm_after_checkout", "your_function"); ?>
add_action("wpdm_after_checkout", "wpdm_send_instructions"); function wpdm_send_instructions($order_id){ $items = Order::getOrderItems($order_id); $customer = Order::customerInfo($order_id); foreach($items as $item){ $product_id = $item['pid']; $params = array( 'to_email' => $customer['email'], 'subject' => 'Custom Setup Instructions', 'message' => 'Your Email Message for Product #'.$product_id, ); \WPDM\Email::send("default", $params); } }
For any technical issue, if you are already using pro version please post in pro forum and free version users please post in free forum. Otherwise, if you have any pre-sale or order related query please contact live chat support team. For technical support.