Trigger woocommerce order email hook from subscription payment
问题 I'd like to hook into the subscription plugin when a new order has been placed which I have done successfully using this action: woocommerce_checkout_subscription_created . Inside the function for that action I want to modify the email that goes out to the customer which I have tried to do like so: <?php function subscription_created($subscription){ add_action('woocommerce_email_before_order_table','my_offer',20); $order = $subscription->order; function my_offer($order){ echo "<h2>Your Trial