I am using Woocommerce and the application has the following flow:
you can use something like below:
add_action( 'woocommerce_email_order_details', 'email_custom', 5, 4 );
function email_custom( $order, $sent_to_admin, $plain_text, $email ) {
// get product id from api...
$product_id = '';
echo '<p><strong>Product Id</strong>: '. $product_id .'</p>';
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.