“woocommerce_order_status_changed” Réponses codées

woocommerce_order_status_changed

function forcesendmail ( $order_id, $old_status, $new_status ){
  $order = new WC_Order($order_id);
    if( $new_status == "processing" ) {
	   WC()->mailer()->emails['WC_Email_Customer_Processing_Order']->trigger($order_id);
    }
}

add_action( 'woocommerce_order_status_changed', 'forcesendmail', 99, 3 );
Shubham Rathod

woocommerce_order_status_changed Ajouter une action

add_action('woocommerce_order_status_changed', 'woo_order_status_change_custom', 10, 3);
Cheerful Cod

Réponses similaires à “woocommerce_order_status_changed”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code