xpay✦ Commerce
Directory
WooCommerce plugins
F4 Shipping Phone and E-Mail for WooCommerce
F4 Shipping Phone and E-Mail for WooCommerce
Adds fields for e-mail and/or telephone to the WooCommerce shipping address.
5.0
(8 ratings)Will this break my store?
What the WordPress.org registry says about keeping F4 Shipping Phone and E-Mail for WooCommerce running.
Tested to 7.0.2
Tested against the WordPress branch in use today.23 days ago
At least 3.0 releases a year since launch. WordPress.org only lists versions still available for download, so the real number may be higher.7.0
Your host must be running at least this version.5.0
woocommerce
These must be installed and active first.1
A single maintainer. Worth knowing if the plugin is load-bearing for your store.Maintenance & trust
Scored on how F4 Shipping Phone and E-Mail for WooCommerce is looked after — not on how many stores run it.
93
out of 100Maintenance
35 / 35WordPress compatibility
20 / 20Support responsiveness
Not enough dataMerchant satisfaction
12 / 15Listing transparency
7 / 10Ratings
5.0
8 ratingsF4 Shipping Phone and E-Mail for WooCommerce does exactly what the name says. It adds (often needed) fields
for e-mail and/or telephone number to the shipping address. Here are a few things the plugin does:
- Adds e-mail and/or telephone field to the shipping address checkout form
- Adds e-mail and/or telephone field to the edit shipping address form
- Adds e-mail and/or telephone field to the edit order backend page
- Shows e-mail and/or telephone field in privacy data export
- Erases e-mail and/or telephone data if privacy erase is requested
- Shows e-mail and/or telephone field in orders (thank you page, email etc.)
- Full integration into the PayPal payment gateway
Usage
This plugin works out-of-the-box. By default, the settings from the billing address
are used for both fields (e-mail = required and telephone = required, optional or hidden, according to the billing address settings).
You can change the settings for both fields on the Accounts & Privacy screen in your WooCommerce settings. Both fields you can hide or set to optional/required.
Features overview
- Adds e-mail and/or telephone fields
- Works without configuration
- Can be configurated for both fields
- Easy to use
- Lightweight and optimized
- 100% free!
Planned features
- Full integration into API and REST
- Compatibility check for other popular payment gateways
Since WooCommerce 5.6 the shipping phone is natively supported in the formatted shipping address. You have to make sure that your template files
(emails/email-addresses.php, emails/plain/email-addresses.php, order/order-details-customer.php) are up-to-date (@version 5.6.0). If your template is not at
least 5.6 compatible then you can simply add the following hook to your functions.php. This hook should restore the previous functionality until your templates are up-to-date:
add_filter('F4/WCSPE/append_phone_field_to_formatted_address', '__return_true')
Since WooCommerce 5.6 the order of our shipping email/phone fields is different than the billing email/phone fields. Thats because our simple solution to add
this fields to every theme without changing the code is limited and the WooCommerce 5.6 update changes a few things in the template files that prevents us from
displaying the fields in the right order. Also the shipping fields may look different than the billing fields, because we don’t add any html code to format the output.
If you want to change the order of the billing phone/email or the displayed output, you can follow these steps to disable our default output and add your own code:
Add the following hook to your theme (functions.php):
add_filter('F4/WCSPE/append_email_field_to_formatted_address', '__return_false');
add_filter('F4/WCSPE/append_phone_field_to_formatted_address', '__return_false'); // only for versions lesser than 5.6
Search in the template file emails/email-addresses.php for the following code:
<address class="address">
<?php echo wp_kses_post( $shipping ); ?>
<?php if ( $order->get_shipping_phone() ) : ?>
<br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
<?php endif; ?>
</address>
and replace it with this code:
<address class="address">
<?php echo wp_kses_post( $shipping ); ?>
<?php if ( $order->get_shipping_phone() ) : ?>
<br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
<?php endif; ?>
<?php if ( $order->get_meta('_shipping_email') ) : ?>
<br/><?php echo esc_html( $order->get_meta('_shipping_email') ); ?>
<?php endif; ?>
</address>
Search in the template file emails/plain/email-addresses.php for the following code:
if ( $order->get_shipping_phone() ) {
echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
and replace it with this code:
if ( $order->get_shipping_phone() ) {
echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
if ( $order->get_meta('_shipping_email') ) {
echo $order->get_meta('_shipping_email') . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
Search in the template file order/order-details-customer.php for the following code:
<?php if ( $order->get_shipping_phone() ) : ?>
<p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_shipping_phone() ); ?></p>
<?php endif; ?>
and replace it with this code:
<?php if ( $order->get_shipping_phone() ) : ?>
<p class="woocommerce-customer-details--phone"><?php echo esc_html( $order->get_shipping_phone() ); ?></p>
<?php endif; ?>
<?php if ( $order->get_meta('_shipping_email') ) : ?>
<p class="woocommerce-customer-details--email"><?php echo esc_html( $order->get_meta('_shipping_email') ); ?></p>
<?php endif; ?>
The code may vary in your theme, you just have to look for similar looking code.
Yes, absolutely!
Plugin details
Tags on WordPress.org
