| 1 |
<?php |
| 2 |
|
| 3 |
namespace TierPricingTable\Addons\AdvancedQuantityOptions; |
| 4 |
|
| 5 |
use TierPricingTable\Addons\AbstractAddon; |
| 6 |
use TierPricingTable\Addons\AdvancedQuantityOptions\API\MaximumOrderQuantity; |
| 7 |
use TierPricingTable\Addons\AdvancedQuantityOptions\API\QuantityStep; |
| 8 |
use TierPricingTable\Addons\AdvancedQuantityOptions\ProductEditor\ProductEditor; |
| 9 |
class AdvancedQuantityOptionsAddon extends AbstractAddon { |
| 10 |
const MAXIMUM_QUANTITY_BASE_META_KEY = 'maximum_quantity'; |
| 11 |
|
| 12 |
const GROUP_OF_QUANTITY_BASE_META_KEY = 'group_of_quantity'; |
| 13 |
|
| 14 |
public function getName() : string { |
| 15 |
return __( 'Advanced product quantity options', 'tier-pricing-table' ); |
| 16 |
} |
| 17 |
|
| 18 |
public function getDescription() : string { |
| 19 |
return __( 'Set maximum, and step quantities for products.', 'tier-pricing-table' ); |
| 20 |
} |
| 21 |
|
| 22 |
public function getIcon() : string { |
| 23 |
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>'; |
| 24 |
} |
| 25 |
|
| 26 |
public function getSlug() : string { |
| 27 |
return 'additional-product-quantity-options'; |
| 28 |
} |
| 29 |
|
| 30 |
public function run() { |
| 31 |
$form = new AdvancedQuantityOptionsForm(); |
| 32 |
new RoleBasedOptions($form); |
| 33 |
new ProductOptions($form); |
| 34 |
new GlobalPricingOptions($form); |
| 35 |
new ProductEditor(); |
| 36 |
} |
| 37 |
|
| 38 |
} |
| 39 |
|