Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Abstract_Order::get_billing_and_current_user_aliases( string $billing_email )
Helper method to get all aliases for current user and provide billing email.
Description Description
Parameters Parameters
- $billing_email
-
(Required) Billing email provided in form.
Return Return
(array) Array of all aliases.
Source Source
File: includes/abstracts/abstract-wc-order.php
private function get_billing_and_current_user_aliases( $billing_email ) { $emails = array( $billing_email ); if ( get_current_user_id() ) { $emails[] = wp_get_current_user()->user_email; } $emails = array_unique( array_map( 'strtolower', array_map( 'sanitize_email', $emails ) ) ); $customer_data_store = WC_Data_Store::load( 'customer' ); $user_ids = $customer_data_store->get_user_ids_for_billing_email( $emails ); return array_merge( $user_ids, $emails ); }