ACF Custom field returning NaN on some records
-
Hi.
I am trying to generate an export which pulls in an ACF custom field from product meta that was within the order, however, certain products are returning NaN yet other products (the SAME product) are returning the correct data. here is the script:
add_filter('woe_get_order_product_value_Course_Date', function ($value, $order, $item, $product,$item_meta) { return get_field('date_start', $product->id, false, false); }, 10, 5);
for products that have a date_start value this is being returned, yet on subsequent order lines, for the same product, the date is returning as NaN. for products which do not include a date_start, nothing is returned (this is correct).
the problem appears to be the inconsistency between the same products in different orders
- The topic ‘ACF Custom field returning NaN on some records’ is closed to new replies.