| @@ -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/'; |
| @@ -100,13 +120,13 @@ | ||
| 100 | 120 | return $this->getContainer()->getFileManager()->locateAsset( 'admin/integrations/woocommerce-develop.jpeg' ); |
| 101 | 121 | } |
| 102 | 122 | |
| 103 | 123 | public function getTitle(): string { |
| 104 | - return __( 'Product Bundles (by WooCommerce)', 'tier-pricing-table' ); | |
| 124 | + return 'Product Bundles (by WooCommerce)'; | |
| 105 | 125 | } |
| 106 | 126 | |
| 107 | 127 | public function getDescription(): string { |
| 108 | - return __( 'Integration provides compatibility with Product Bundles for WooCommerce to support bundle product type.', | |
| 128 | + return __( 'Apply tiered pricing discounts correctly to WooCommerce Product Bundles.', | |
| 109 | 129 | 'tier-pricing-table' ); |
| 110 | 130 | } |
| 111 | 131 | |
| 112 | 132 | public function getSlug(): string { |