DataStore
API\Reports\Coupons\DataStore.
Description Description
Source Source
File: packages/woocommerce-admin/src/API/Reports/Coupons/DataStore.php
Methods Methods
- add_order_by_params — Fills ORDER BY clause of SQL request based on user supplied parameters.
- add_sql_query_params — Updates the database query with parameters used for Products report: categories and order status.
- assign_report_columns — Assign report columns once full table name has been assigned.
- delete_coupon — Deletes the coupon lookup information when a coupon is deleted.
- get_coupon_id — Get coupon ID for an order.
- get_coupons — Gets coupons based on the provided arguments.
- get_data — Returns the report data based on parameters supplied by the user.
- get_included_coupons_array — Returns an array of ids of included coupons, based on query arguments from the user.
- include_extended_info — Enriches the coupon data with extra attributes.
- init — Set up all the hooks for maintaining and populating table data.
- initialize_queries — Initialize query objects.
- normalize_order_by — Maps ordering specified by the user to columns in the database/fields in the data.
- sync_on_order_delete — Clean coupons data when an order is deleted.
- sync_order_coupons — Create or update an an entry in the wc_order_coupon_lookup table for an order.