| 1 |
<?php namespace TierPricingTable\Integrations\Plugins; |
| 2 |
|
| 3 |
class MixMatch extends PluginIntegrationAbstract { |
| 4 |
|
| 5 |
public function run() { |
| 6 |
add_filter( 'tiered_pricing_table/cart/need_price_recalculation', function ( $bool, $cart_item ) { |
| 7 |
|
| 8 |
if ( isset( $cart_item['mnm_container'] ) ) { |
| 9 |
return false; |
| 10 |
} |
| 11 |
|
| 12 |
return $bool; |
| 13 |
|
| 14 |
}, 10, 2 ); |
| 15 |
} |
| 16 |
|
| 17 |
public function getIconURL(): string { |
| 18 |
return $this->getContainer()->getFileManager()->locateAsset( 'admin/integrations/mix-match-icon.png' ); |
| 19 |
} |
| 20 |
|
| 21 |
public function getAuthorURL(): string { |
| 22 |
return 'https://woocommerce.com/products/woocommerce-mix-and-match-products/'; |
| 23 |
} |
| 24 |
|
| 25 |
public function getTitle(): string { |
| 26 |
return 'Mix&Match for WooCommerce'; |
| 27 |
} |
| 28 |
|
| 29 |
public function getDescription(): string { |
| 30 |
return __( 'Apply tiered pricing rules correctly to Mix and Match products.', 'tier-pricing-table' ); |
| 31 |
} |
| 32 |
|
| 33 |
public function getSlug(): string { |
| 34 |
return 'mix-match-for-woocommerce'; |
| 35 |
} |
| 36 |
|
| 37 |
public function getIntegrationCategory(): string { |
| 38 |
return 'custom_product_types'; |
| 39 |
} |
| 40 |
} |
| 41 |
|