woocommerce put wa.me link instead of tel
-
hi I found this file:
wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php
I think he generates the page where I see the orders and I would like to make sure that the link where the phone number of the person ordering is placed instead of having me call the person sends me to a WhatsApp chat or maybe have both above the number with the call link and below the number with the chat link
this code at line 479
<div class="address"> <?php // Display values. if ( $order->get_formatted_shipping_address() ) { echo '<p>' . wp_kses( $order->get_formatted_shipping_address(), array( 'br' => array() ) ) . '</p>'; } else { echo '<p class="none_set"><strong>' . esc_html__( 'Address:', 'woocommerce' ) . '</strong> ' . esc_html__( 'No shipping address set.', 'woocommerce' ) . '</p>'; } if ( ! empty( self::$shipping_fields ) ) { foreach ( self::$shipping_fields as $key => $field ) { if ( isset( $field['show'] ) && false === $field['show'] ) { continue; } $field_name = 'shipping_' . $key; if ( is_callable( array( $order, 'get_' . $field_name ) ) ) { $field_value = $order->{"get_$field_name"}( 'edit' ); } else { $field_value = $order->get_meta( '_' . $field_name ); } if ( 'shipping_phone' === $field_name ) { $field_value = wc_make_phone_clickable( $field_value ); } if ( $field_value ) { echo '<p><strong>' . esc_html( $field['label'] ) . ':</strong> ' . wp_kses_post( $field_value ) . '</p>'; } } } if ( apply_filters( 'woocommerce_enable_order_notes_field', 'yes' === get_option( 'woocommerce_enable_order_comments', 'yes' ) ) && $order->get_customer_note() ) { // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment echo '<p class="order_note"><strong>' . esc_html( __( 'Customer provided note:', 'woocommerce' ) ) . '</strong> ' . nl2br( esc_html( $order->get_customer_note() ) ) . '</p>'; } ?> </div>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘woocommerce put wa.me link instead of tel’ is closed to new replies.