This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -1,11 +1,25 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
use function PixelYourSite\isWooUseHPStorage;
include_once "function-helper.php";
$order = wc_get_order($orderId);
$data = $order->get_meta("pys_enrich_data",true);
$dataAnalytics = $order->get_meta("pys_enrich_data_analytics",true);
$data = array();
$dataAnalytics = array();
if(isWooUseHPStorage()) {
// WooCommerce >= 3.0
if($order) {
$data = $order->get_meta( 'pys_enrich_data', true );
}
if($dataAnalytics && is_array($dataAnalytics) && is_array($data)) {
$data = array_merge($data,$dataAnalytics);
} 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)) :