Automattic\WooCommerce\Admin\Schedulers
CustomersScheduler::exclude_existing_customers_from_query() public WC 1.0
Exclude users that already exist in our customer lookup table.
Meant to be hooked into 'pre_user_query' action.
{} Это метод класса: CustomersScheduler{}
Хуков нет.
Возвращает
null
. Null. Ничего.
Использование
$result = CustomersScheduler::exclude_existing_customers_from_query( $wp_user_query );
- $wp_user_query(WP_User_Query) (обязательный)
- WP_User_Query to modify.
Код CustomersScheduler::exclude_existing_customers_from_query() CustomersScheduler::exclude existing customers from query WC 5.1.0
public static function exclude_existing_customers_from_query( $wp_user_query ) {
global $wpdb;
$wp_user_query->query_where .= " AND NOT EXISTS (
SELECT ID FROM {$wpdb->prefix}wc_customer_lookup
WHERE {$wpdb->prefix}wc_customer_lookup.user_id = {$wpdb->users}.ID
)";
}