/** * Hook into 'woocommerce_composite_component_cart_item_identifier' to add stamp data for bundles. * * @param array $composited_item_identifier * @param string $composited_item_id * @return array */ public static function composite_bundle_cart_item_stamp($composited_item_identifier, $composited_item_id) { if (isset($composited_item_identifier['type']) && $composited_item_identifier['type'] === 'bundle') { WC_PB_Compatibility::$bundle_prefix = $composited_item_id; $bundle_cart_data = WC_PB()->cart->woo_bundles_add_cart_item_data(array(), $composited_item_identifier['product_id']); $composited_item_identifier['stamp'] = $bundle_cart_data['stamp']; WC_PB_Compatibility::$bundle_prefix = ''; } return $composited_item_identifier; }