/** * Show the FunnelKit custom checkout fields (WhatsApp #, Calls #, country codes) * in the WooCommerce order emails. * add_action( 'woocommerce_email_after_order_table', 'sl_email_contact_numbers', 25, 3 ); function sl_email_contact_numbers( $order, $sent_to_admin = false, $plain_text = false ) { if ( ! $order instanceof WC_Order ) { return; } // Prevent double output if the hook fires more than once for one email. static $done = array(); $oid = $order->get_id(); if ( isset( $done[ $oid ] ) ) { return; } $done[ $oid ] = true; // Helper: read first non-empty meta from a list of keys. $meta = function ( array $keys ) use ( $order ) { foreach ( $keys as $k ) { $v = $order->get_meta( $k ); if ( '' !== $v && null !== $v ) { return $v; } } return ''; }; // Country code is stored like "961-lb-lbn" -> render as "+961". $dial = function ( $cc ) { if ( ! $cc ) { return ''; } $first = explode( '-', $cc )[0]; $digits = preg_replace( '/\D/', '', $first ); return $digits ? '+' . $digits . ' ' : ''; }; $rows = array(); // WhatsApp number $wa = $meta( array( 'billing_phone2', '_billing_phone2' ) ); if ( $wa ) { $rows['WhatsApp Number'] = $dial( $meta( array( 'billing_country_code_wt', '_billing_country_code_wt' ) ) ) . $wa; } // Calls number (shipping_phone is the "Phone (Calls Number)" field; billing_phone1 is a legacy fallback) $call = $meta( array( 'shipping_phone', '_shipping_phone', 'billing_phone1', '_billing_phone1' ) ); if ( $call ) { $rows['Phone (Calls)'] = $dial( $meta( array( 'billing_country_code', '_billing_country_code' ) ) ) . $call; } if ( empty( $rows ) ) { return; } if ( $plain_text ) { echo "\n----------\n"; foreach ( $rows as $label => $val ) { echo $label . ': ' . $val . "\n"; } return; } echo '

Contact Numbers

'; echo ''; } Checkout | Secrets Lebanon
Details
Special Offers
Done
1
Details
2
Offers
3
Done
When you order with Secrets Lebanon, here’s what you get:

100% Discreet Delivery

High Quality Original Toys

Same Day Beirut Delivery

Data Erased After Purchase

1
Realistic 3in1 Masturbator Sleeve
Realistic 3in1 Masturbator Sleeve × 1
-
+
$88
Subtotal $88
Total $93

Delivery Info

Lebanon

Shipping Method

  • $5

Your Products

Order summary

Product
Total
1
Realistic 3in1 Masturbator Sleeve
Realistic 3in1 Masturbator Sleeve × 1
$88
Subtotal $88
Shipping $5
Total $93

Add a tip?

Payment Information

All transactions are secure and encrypted. Credit card information is never stored on our servers.

100% Discreet Delivery

High Quality Original Toys

Same Day Beirut Delivery

Data Erased After Purchase

Copyright 2026. All rights reserved