| 1 |
<?php namespace TierPricingTable\Integrations\Plugins\MixMatch; |
| 2 |
|
| 3 |
use TierPricingTable\Settings\CustomOptions\TPTSwitchOption; |
| 4 |
use TierPricingTable\Settings\Sections\SectionAbstract; |
| 5 |
|
| 6 |
class Settings extends SectionAbstract { |
| 7 |
|
| 8 |
const PRICE_CHILD_ITEMS_KEY = 'mix_match_price_child_items'; |
| 9 |
|
| 10 |
public function getName(): string { |
| 11 |
return 'Mix & Match'; |
| 12 |
} |
| 13 |
|
| 14 |
public function getSlug(): string { |
| 15 |
return 'mix_match'; |
| 16 |
} |
| 17 |
|
| 18 |
public function getSettings(): array { |
| 19 |
return array( |
| 20 |
array( |
| 21 |
'title' => 'Mix & Match', |
| 22 |
'id' => \TierPricingTable\Settings\Settings::SETTINGS_PREFIX . '_subsection_' . $this->getSlug(), |
| 23 |
'desc' => __( 'Configure how tiered pricing works with WooCommerce Mix and Match Products.', |
| 24 |
'tier-pricing-table' ), |
| 25 |
'type' => 'title', |
| 26 |
), |
| 27 |
array( |
| 28 |
'title' => __( 'Apply tiered pricing inside containers', 'tier-pricing-table' ), |
| 29 |
'id' => \TierPricingTable\Settings\Settings::SETTINGS_PREFIX . self::PRICE_CHILD_ITEMS_KEY, |
| 30 |
'type' => TPTSwitchOption::FIELD_TYPE, |
| 31 |
'default' => 'no', |
| 32 |
'extended_description' => __( 'Apply tiered pricing rules to the products inside a Mix and Match container. Works only for containers with per-item pricing: their contents are priced individually, so tiered pricing can discount them. Containers with a static price always keep the price set by the Mix and Match plugin.', |
| 33 |
'tier-pricing-table' ), |
| 34 |
), |
| 35 |
array( |
| 36 |
'type' => 'sectionend', |
| 37 |
), |
| 38 |
); |
| 39 |
} |
| 40 |
|
| 41 |
public function isIntegration(): bool { |
| 42 |
return true; |
| 43 |
} |
| 44 |
} |
| 45 |
|