empty( $_REQUEST['section'] ) ? '_featured' : wc_clean( wp_unslash( $_REQUEST['section'] ) ), ); if ( ! empty( $_REQUEST['search'] ) ) { $event = 'extensions_view_search'; $properties['search_term'] = wc_clean( wp_unslash( $_REQUEST['search'] ) ); } // phpcs:enable WC_Tracks::record_event( $event, $properties ); } /** * Send a Tracks even when a Helper connection process is initiated. */ public function track_helper_connection_start() { WC_Tracks::record_event( 'extensions_subscriptions_connect' ); } /** * Send a Tracks even when a Helper connection process is cancelled. */ public function track_helper_connection_cancelled() { WC_Tracks::record_event( 'extensions_subscriptions_cancelled' ); } /** * Send a Tracks even when a Helper connection process completed successfully. */ public function track_helper_connection_complete() { WC_Tracks::record_event( 'extensions_subscriptions_connected' ); } /** * Send a Tracks even when a Helper has been disconnected. */ public function track_helper_disconnected() { WC_Tracks::record_event( 'extensions_subscriptions_disconnect' ); } /** * Send a Tracks even when Helper subscriptions are refreshed. */ public function track_helper_subscriptions_refresh() { WC_Tracks::record_event( 'extensions_subscriptions_update' ); } /** * Send a Tracks event when WooCommerce Payments is installed from the Extensions page. */ public function track_woocommerce_payments_install() { $properties = array( 'context' => 'extensions' ); WC_Tracks::record_event( 'woocommerce_payments_install', $properties ); } }