| 1 |
<?php namespace TierPricingTable\Integrations\Plugins; |
| 2 |
|
| 3 |
class WCPProductBundles extends PluginIntegrationAbstract { |
| 4 |
|
| 5 |
public function run() { |
| 6 |
add_filter( 'tiered_pricing_table/cart/need_price_recalculation', function ( $need, $cart_item ) { |
| 7 |
|
| 8 |
if ( ! empty( $cart_item['woosb_parent_id'] ) || ! empty( $cart_item['woosb_ids'] ) ) { |
| 9 |
return false; |
| 10 |
} |
| 11 |
|
| 12 |
return $need; |
| 13 |
|
| 14 |
}, 10, 2 ); |
| 15 |
} |
| 16 |
|
| 17 |
public function addToIntegrationsSettings( $integrations ) { |
| 18 |
return $integrations; |
| 19 |
} |
| 20 |
|
| 21 |
public function getIconURL(): string { |
| 22 |
return ''; |
| 23 |
} |
| 24 |
|
| 25 |
public function getAuthorURL(): string { |
| 26 |
return ''; |
| 27 |
} |
| 28 |
|
| 29 |
public function getTitle(): string { |
| 30 |
return 'WPC Product Bundles for WooCommerce'; |
| 31 |
} |
| 32 |
|
| 33 |
public function getDescription(): string { |
| 34 |
return __( 'Apply tiered pricing discounts correctly to WPC Product Bundles.', 'tier-pricing-table' ); |
| 35 |
} |
| 36 |
|
| 37 |
public function getSlug(): string { |
| 38 |
return 'wcp-product-bundles-for-woocommerce'; |
| 39 |
} |
| 40 |
|
| 41 |
public function getIntegrationCategory(): string { |
| 42 |
return 'custom_product_types'; |
| 43 |
} |
| 44 |
} |
| 45 |
|