Advertisement
michaellevelup

Order meta

Aug 31st, 2022
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. function action_woocommerce_email_after_order_table( $order, $sent_to_admin, $plain_text, $email ) {
  2. // Target certain email notifications
  3. if ( in_array( $email->id, array( 'customer_on_hold_order', 'customer_processing_order', 'customer_completed_order' ) ) ) {
  4. if ( $order->get_shipping_country() != 'Schweiz' ) {
  5.  
  6.     echo '<p><strong>Lieferung:</strong> '.$order->get_meta( 'pi_overall_estimate_min_date' ).' - '.$order->get_meta( 'pi_overall_estimate_max_date' ).'</p>';
  7. }
  8. }
  9. }
  10. add_action( 'woocommerce_email_after_order_table', 'action_woocommerce_email_after_order_table', 10, 4 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement