| @@ -89,8 +89,28 @@ | ||
| 89 | 89 | } |
| 90 | 90 | } ); |
| 91 | 91 | |
| 92 | 92 | add_filter( 'tiered_pricing_table/services/pricing/override_zero_prices', '__return_false' ); |
| 93 | + | |
| 94 | + add_filter( 'tiered_pricing_table/manual_created_orders/modify_item_price', function ( $modify, $item ) { | |
| 95 | + if ( ! $modify ) { | |
| 96 | + return false; | |
| 97 | + } | |
| 98 | + | |
| 99 | + if ( ! ( $item instanceof \WC_Order_Item_Product ) ) { | |
| 100 | + return $modify; | |
| 101 | + } | |
| 102 | + | |
| 103 | + if ( function_exists( 'wc_pb_is_bundled_order_item' ) ) { | |
| 104 | + if ( wc_pb_is_bundled_order_item( $item ) ) { | |
| 105 | + return false; | |
| 106 | + } | |
| 107 | + } elseif ( ! empty( $item->get_meta( '_bundled_by', true ) ) || ! empty( $item->get_meta( 'bundled_by', true ) ) ) { | |
| 108 | + return false; | |
| 109 | + } | |
| 110 | + | |
| 111 | + return $modify; | |
| 112 | + }, 10, 2 ); | |
| 93 | 113 | } |
| 94 | 114 | |
| 95 | 115 | public function getAuthorURL(): string { |
| 96 | 116 | return 'https://woocommerce.com/products/product-bundles/'; |