getOption('woo_enabled_display_data_to_orders') || !isset($orderId)) return; include_once "function-helper.php"; $order = wc_get_order($orderId); $data = array(); $dataAnalytics = array(); if(isWooUseHPStorage()) { // WooCommerce >= 3.0 if($order) { $data = $order->get_meta( 'pys_enrich_data', true ); } } else { // WooCommerce < 3.0 if(get_post_meta($orderId, "pys_enrich_data", true)) { $data = get_post_meta($orderId, "pys_enrich_data",true); } } if($data && is_array($data)) : ?>
| FIRST VISIT | |
| Landing Page: | ' . esc_html($landingPage) . ''; } else { echo '' . esc_html($landingPage) . ' | '; } ?>
|---|---|
| Traffic source: | = esc_html(!empty($data['pys_source']) ? $data['pys_source'] : "No Traffic source") ?> |
| LAST VISIT | |
| Landing Page: | ' . esc_html($lastLanding) . ''; } else { echo '' . esc_html($lastLanding) . ' | '; } ?>
| Traffic source: | = esc_html(!empty($data['last_pys_source']) ? $data['last_pys_source'] : "No Traffic source") ?> |
| Client's browser time | |
| Hour: | = esc_html($userTime[0]); ?> |
| Day: | = esc_html($userTime[1]); ?> |
| Month: | = esc_html($userTime[2]); ?> |