Created
March 25, 2016 20:00
-
-
Save growdev/d8e9ddea3940b0d7e1a7 to your computer and use it in GitHub Desktop.
Trigger WooCommerce email from WP-CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This can be run by wp-cli to trigger an email send. | |
* The email is determined by the action. The one below will trigger the "new order email" | |
*/ | |
WC()->mailer(); | |
$order_id = '260'; // this order needs to exist in your store | |
$args = array( 'order_id' => $order_id ); | |
do_action_ref_array( 'woocommerce_order_status_pending_to_processing_notification', $args ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment