Get order number
-
Hello
We want to display the order number in the E-mail subject. Therefor we use this code snipped here:
add_filter( 'woocommerce_email_subject_customer_completed_order', 'change_completed_email_subject', 1, 2 ); function change_completed_email_subject( $subject, $order ) { global $woocommerce; $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); $subject = sprintf( '%s, Deine %s Bestellung wurde versendet! %s', $order->billing_first_name, $blogname, $order->get_id() ); return $subject; }
Its working. But I always takes the “old” or lets say “post ID” number instead the new order from the sequential plugin.
How can we get that number?
Cheers
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Get order number’ is closed to new replies.