WPC Product Bundles for WooCommerce
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
add_filter( 'wpo_skip_add_to_cart_item', function ( $skip, $item ) { return isset($item['woosb_parent_id']) ? true : $skip; }, 10, 2 ); add_filter( 'wpo_is_child_cart_item', function ( $child, $item ) { return isset($item['woosb_parent_id']) ? true : $child; }, 10, 2 ); add_filter( 'wpo_search_product_types', function ( $types ) { $types[] = "woosb"; return $types; } ); add_filter('wpo_add_configured_products_skip_item', function ($skip, $item_data) { return isset($item_data['woosb_parent_key']) ? true : $skip; }, 10, 2); add_filter('wpo_children_cart_item', function ($children, $item) { return isset($item['woosb_keys']) ? $item['woosb_keys'] : $children; }, 10, 2); add_filter('wpo_cart_item_is_price_readonly', function ($is_readonly, $item) { return isset($item['woosb_keys']) ? true : $is_readonly; }, 10, 2); add_filter('wpo_load_order_skip_item', function ($skip, $order_item, $order) { return $order_item->get_meta('_woosb_parent_id') ? true : $skip; }, 10, 3); |