Linux 软件免费装
Banner图

F4 Shipping Phone and E-Mail for WooCommerce

开发者 faktorvier
更新时间 2024年4月2日 20:09
捐献地址: 去捐款
PHP版本: 7.0 及以上
WordPress版本: 6.5
版权: GPLv2
版权网址: 版权信息

标签

shop shipping email woocommerce ecommerce checkout order account field fields telephone

下载

1.0.12 1.0.0 1.0.17 1.0.1 1.0.11 1.0.2 1.0.3 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.0.4 1.0.10 1.0.13 1.0.14 1.0.15 1.0.16 1.0.18 1.0.19

详情介绍:

F4 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: 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 Planned features

安装:

  1. Upload the plugin files to the /wp-content/plugins/f4-woocommerce-shipping-phone-and-e-mail directory, or install the plugin through the WordPress plugins screen directly
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Use the Woocommerce -> Settings -> Accounts & Privacy screen to configure the plugin

屏幕截图:

  • Fields on order confirmation page
  • Fields in order confirmation e-mail
  • Fields on the order admin page
  • Fields in edit address form
  • Field configuration in WooCommerce settings

常见问题:

Since WooCommerce 5.6 the shipping phone is missing in the email addresses and on the order page

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')

The shipping email/phone fields are displayed wrong or different than the billing email/phone fields

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: get_shipping_phone() ) : ?> get_shipping_phone() ); ?> and replace it with this code: get_shipping_phone() ) : ?> get_shipping_phone() ); ?> get_meta('_shipping_email') ) : ?> get_meta('_shipping_email') ); ?> 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: get_shipping_phone() ) : ?> get_shipping_phone() ); ?> and replace it with this code: get_shipping_phone() ) : ?> get_shipping_phone() ); ?> get_meta('_shipping_email') ) : ?> get_meta('_shipping_email') ); ?> The code may vary in your theme, you just have to look for similar looking code.

Is it really free?

Yes, absolutely!

更新日志:

1.0.19 1.0.18 1.0.17 1.0.16 1.0.15 1.0.14 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0