tier-pricing-table
/
src
/
Addons
/
AdvancedQuantityOptions
/
ProductEditor
/
MaximumOrderQuantityBlock.php
MaximumOrderQuantityBlock.php in Tiered Pricing Table for WooCommerce 7.1.5, at src/Addons/AdvancedQuantityOptions/ProductEditor/MaximumOrderQuantityBlock.php
| 1 | <?php namespace TierPricingTable\Addons\AdvancedQuantityOptions\ProductEditor; |
| 2 | |
| 3 | use TierPricingTable\Addons\ReactProductEditorAddon\Block; |
| 4 | use TierPricingTable\Addons\ReactProductEditorAddon\Sections\MainSection; |
| 5 | |
| 6 | class MaximumOrderQuantityBlock extends Block { |
| 7 | |
| 8 | public function getCustomBlockFolder(): ?string { |
| 9 | return null; |
| 10 | } |
| 11 | |
| 12 | public function getId(): string { |
| 13 | return 'tiered-pricing-table/product-editor-maximum-quantity'; |
| 14 | } |
| 15 | |
| 16 | public function getBlockName(): string { |
| 17 | return 'woocommerce/product-number-field'; |
| 18 | } |
| 19 | |
| 20 | public function getOrder(): int { |
| 21 | return 40; |
| 22 | } |
| 23 | |
| 24 | public function getSectionId(): string { |
| 25 | return MainSection::ID; |
| 26 | } |
| 27 | |
| 28 | public function getAttributes(): array { |
| 29 | return array( |
| 30 | 'label' => __( 'Maximum Order Quantity', 'tier-pricing-table' ), |
| 31 | 'property' => 'tiered_pricing_maximum_quantity', |
| 32 | 'min' => 2, |
| 33 | ); |
| 34 | } |
| 35 | |
| 36 | public function isCustomBlock(): bool { |
| 37 | return false; |
| 38 | } |
| 39 | |
| 40 | public function wrapToPremium(): bool { |
| 41 | return true; |
| 42 | } |
| 43 | } |
| 44 |