WC_Orders_Tracking
in package
This class adds actions to track usage of WooCommerce Orders.
Table of Contents
- init() : mixed
- Init tracking.
- possibly_add_order_tracking_scripts() : mixed
- Adds the tracking scripts for product setting pages.
- track_add_order_from_edit() : mixed
- Track "add order" button on the Edit Order screen.
- track_created_date_change() : mixed
- Send a Tracks event when an order date is changed.
- track_order_action() : mixed
- Track order actions taken.
- track_order_search() : mixed
- Send a track event when on the Order Listing page, and search results are being displayed.
- track_order_status_change() : mixed
- Send a Tracks event when an order status is changed.
- track_orders_view() : mixed
- Send a Tracks event when the Orders page is viewed.
- track_search_in_orders_list() : mixed
- Send a track event when on the Order Listing page, and search results are being displayed.
Methods
init()
Init tracking.
public
init() : mixed
Return values
mixed —possibly_add_order_tracking_scripts()
Adds the tracking scripts for product setting pages.
public
possibly_add_order_tracking_scripts() : mixed
Return values
mixed —track_add_order_from_edit()
Track "add order" button on the Edit Order screen.
public
track_add_order_from_edit() : mixed
Return values
mixed —track_created_date_change()
Send a Tracks event when an order date is changed.
public
track_created_date_change(int $id) : mixed
Parameters
- $id : int
-
Order id.
Return values
mixed —track_order_action()
Track order actions taken.
public
track_order_action(int $order_id) : mixed
Parameters
- $order_id : int
-
Order ID.
Return values
mixed —track_order_search()
Send a track event when on the Order Listing page, and search results are being displayed.
public
track_order_search(array<string|int, mixed> $order_ids, string $term, array<string|int, mixed> $search_fields) : mixed
Parameters
- $order_ids : array<string|int, mixed>
-
Array of order_ids that are matches for the search.
- $term : string
-
The string that was used in the search.
- $search_fields : array<string|int, mixed>
-
Fields that were used in the original search.
Tags
Return values
mixed —track_order_status_change()
Send a Tracks event when an order status is changed.
public
track_order_status_change(int $id, string $previous_status, string $next_status) : mixed
Parameters
- $id : int
-
Order id.
- $previous_status : string
-
the old WooCommerce order status.
- $next_status : string
-
the new WooCommerce order status.
Return values
mixed —track_orders_view()
Send a Tracks event when the Orders page is viewed.
public
track_orders_view() : mixed
Return values
mixed —track_search_in_orders_list()
Send a track event when on the Order Listing page, and search results are being displayed.
public
track_search_in_orders_list() : mixed