Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('wcfm_orderlist_shipping_address', function($address, $order_id) {
- $order = wc_get_order($order_id);
- if(!$order || !apply_filters( 'wcfm_allow_view_customer_email', true ) || !apply_filters( 'wcfm_allow_view_customer_billing_email', true ) ) return $address;
- if($order->get_shipping_phone()) {
- $address .= '<p><strong>Phone:</strong> ' . make_clickable( esc_html( $order->get_shipping_phone() ) ) . '</p>';
- } else {
- if ( is_callable( array( $order, 'get_billing_phone' ) ) ) {
- $field_value = $order->get_billing_phone( );
- } else {
- $field_value = $order->get_meta( '_' . 'billing_phone' );
- }
- $address .= '<br /><strong>Phone:</strong> ' . make_clickable( esc_html( $field_value ) );
- }
- return $address;
- }, 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement