Server IP : 66.29.132.122 / Your IP : 52.15.115.110 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /var/softaculous/sitepad/editor/site-data/plugins/kkart-pro/includes/tracks/events/ |
Upload File : |
<?php /** * Kkart Order Tracking * * @package Kkart\Tracks */ defined( 'ABSPATH' ) || exit; /** * This class adds actions to track usage of a Kkart Order. */ class KKART_Order_Tracking { /** * Init tracking. */ public function init() { add_action( 'kkart_admin_order_data_after_order_details', array( $this, 'track_order_viewed' ) ); } /** * Send a Tracks event when an order is viewed. * * @param KKART_Order $order Order. */ public function track_order_viewed( $order ) { if ( ! $order instanceof KKART_Order || ! $order->get_id() ) { return; } $properties = array( 'current_status' => $order->get_status(), 'date_created' => $order->get_date_created() ? $order->get_date_created()->format( DateTime::ATOM ) : '', 'payment_method' => $order->get_payment_method(), ); KKART_Tracks::record_event( 'single_order_view', $properties ); } }