DataStore
Admin\API\Reports\Customers\DataStore.
Description Description
Source Source
File: packages/woocommerce-admin/src/API/Reports/Customers/DataStore.php
Methods Methods
- add_sql_query_params — Updates the database query with parameters used for Customers report: categories and order status.
- add_time_period_sql_params — Fills WHERE clause of SQL request with date-related constraints.
- assign_report_columns — Assign report columns once full table name has been assigned.
- delete_customer — Delete a customer lookup row.
- delete_customer_by_user_id — Delete a customer lookup row by WordPress User ID.
- get_customer_id_by_user_id — Retrieve a registered customer row id by user_id.
- get_customer_order_data_and_format — Returns a data object and format object of the customers data coming from the order.
- get_data — Returns the report data based on parameters supplied by the user.
- get_existing_customer_id_from_order — Returns an existing customer ID for an order if one exists.
- get_guest_id_by_email — Retrieve a guest ID (when user_id is null) by email.
- get_last_order — Retrieve the last order made by a customer.
- get_oldest_orders — Retrieve the oldest orders made by a customer.
- get_or_create_customer_from_order — Get or create a customer from a given order.
- get_order_count — Retrieve the amount of orders made by a customer.
- init — Set up all the hooks for maintaining and populating table data.
- initialize_queries — Initialize query objects.
- is_valid_customer — Check if a user ID is a valid customer or other user role with past orders.
- normalize_order_by — Maps ordering specified by the user to columns in the database/fields in the data.
- sync_on_order_delete — Sync customers data after an order was deleted.
- sync_order_customer — Sync customers data after an order was updated.
- update_registered_customer — Update the database with customer data.
- update_registered_customer_via_last_active — Trigger a customer update if their "last active" meta value was changed.