Product Items Duplication
-
Hi There,
We’re using Product Add‑Ons Ultimate Pro (to generate child products) along with Flexible Product Fields for student name fields. Our previous snippet—using
_composite_childsto hide duplicate “Student’s First Name” and “Student’s Surname” fields on child products—no longer works. Could you advise which meta key or method we should use now to hide these duplicate fields?The previous snippet was as follows:
if (!function_exists(‘hide_duplicate_addon_fields’)) {
/** * Hide duplicate addon field entries in the cart. * * @param bool $visible * @param array $cart_item * * @return bool Modified visibility status. */ function hide_duplicate_addon_fields($visible, $cart_item) { $product_id = $cart_item['product_id']; $is_composite = get_post_meta($product_id, '_composite_childs', true); if ($is_composite) { $visible = false; } return $visible; }}
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Product Items Duplication’ is closed to new replies.