diff --git a/plugins/woocommerce/changelog/fix-26692-order-invoice-nomenclature b/plugins/woocommerce/changelog/fix-26692-order-invoice-nomenclature new file mode 100644 index 00000000000..9659c36ac2d --- /dev/null +++ b/plugins/woocommerce/changelog/fix-26692-order-invoice-nomenclature @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Prefer the use of 'order details' (instead of 'invoice') in our order emails. diff --git a/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php b/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php index 622dcc29a84..8dcb5247805 100644 --- a/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php +++ b/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php @@ -199,7 +199,7 @@ class WC_Meta_Box_Order_Actions { */ private static function get_available_order_actions_for_order( $order ) { $actions = array( - 'send_order_details' => __( 'Email invoice / order details to customer', 'woocommerce' ), + 'send_order_details' => __( 'Send order details to customer', 'woocommerce' ), 'send_order_details_admin' => __( 'Resend new order notification', 'woocommerce' ), 'regenerate_download_permissions' => __( 'Regenerate download permissions', 'woocommerce' ), ); diff --git a/plugins/woocommerce/includes/emails/class-wc-email-customer-invoice.php b/plugins/woocommerce/includes/emails/class-wc-email-customer-invoice.php index 0a2592cacf5..bd6c7b9f05d 100644 --- a/plugins/woocommerce/includes/emails/class-wc-email-customer-invoice.php +++ b/plugins/woocommerce/includes/emails/class-wc-email-customer-invoice.php @@ -12,9 +12,11 @@ if ( ! defined( 'ABSPATH' ) ) { if ( ! class_exists( 'WC_Email_Customer_Invoice', false ) ) : /** - * Customer Invoice. + * Order details email. * - * An email sent to the customer via admin. + * An email sent to the customer via admin, that summarizes the details of their order. This was + * historically referred to as the 'invoice', and for backwards compatibility reasons that is still + * reflected in the class name (although on a user-level we have moved away from that nomenclature). * * @class WC_Email_Customer_Invoice * @version 3.5.0 @@ -29,8 +31,8 @@ if ( ! class_exists( 'WC_Email_Customer_Invoice', false ) ) : public function __construct() { $this->id = 'customer_invoice'; $this->customer_email = true; - $this->title = __( 'Customer invoice / Order details', 'woocommerce' ); - $this->description = __( 'Customer invoice emails can be sent to customers containing their order information and payment links.', 'woocommerce' ); + $this->title = __( 'Order details', 'woocommerce' ); + $this->description = __( 'Order detail emails can be sent to customers containing their order information and payment links.', 'woocommerce' ); $this->template_html = 'emails/customer-invoice.php'; $this->template_plain = 'emails/plain/customer-invoice.php'; $this->placeholders = array( @@ -52,11 +54,7 @@ if ( ! class_exists( 'WC_Email_Customer_Invoice', false ) ) : * @return string */ public function get_default_subject( $paid = false ) { - if ( $paid ) { - return __( 'Invoice for order #{order_number} on {site_title}', 'woocommerce' ); - } else { - return __( 'Your latest {site_title} invoice', 'woocommerce' ); - } + return __( 'Details for order #{order_number} on {site_title}', 'woocommerce' ); } /** @@ -67,11 +65,7 @@ if ( ! class_exists( 'WC_Email_Customer_Invoice', false ) ) : * @return string */ public function get_default_heading( $paid = false ) { - if ( $paid ) { - return __( 'Invoice for order #{order_number}', 'woocommerce' ); - } else { - return __( 'Your invoice for order #{order_number}', 'woocommerce' ); - } + return __( 'Details for order #{order_number}', 'woocommerce' ); } /** diff --git a/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js b/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js index f24cb5f3e16..c137434fa57 100644 --- a/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js +++ b/plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js @@ -225,9 +225,9 @@ test.describe.serial( 'Settings API tests: CRUD', () => { expect.arrayContaining( [ expect.objectContaining( { id: 'email_customer_invoice', - label: 'Customer invoice / Order details', + label: 'Order details', description: - 'Customer invoice emails can be sent to customers containing their order information and payment links.', + 'Order detail emails can be sent to customers containing their order information and payment links.', parent_id: 'email', sub_groups: expect.arrayContaining( [] ), } ), diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-emails.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-emails.spec.js index 87b9840ce28..c7863f40d3c 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-emails.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/order-emails.spec.js @@ -237,7 +237,7 @@ test.describe( 'Merchant > Order Action emails received', () => { .getByRole( 'row' ) .filter( { hasText: customerBilling.email } ) .filter( { - hasText: `Invoice for order #${ orderId } on ${ storeName }`, + hasText: `Details for order #${ orderId } on ${ storeName }`, } ) ).toBeVisible(); } );