| 1 |
<?php namespace TierPricingTable\Addons\ReactProductEditorAddon\Blocks; |
| 2 |
|
| 3 |
use TierPricingTable\Addons\ReactProductEditorAddon\Block; |
| 4 |
use TierPricingTable\Addons\ReactProductEditorAddon\Sections\MainSection; |
| 5 |
|
| 6 |
class MinQuantity 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-min-quantity'; |
| 14 |
} |
| 15 |
|
| 16 |
public function getBlockName(): string { |
| 17 |
return 'woocommerce/product-number-field'; |
| 18 |
} |
| 19 |
|
| 20 |
public function getOrder(): int { |
| 21 |
return 30; |
| 22 |
} |
| 23 |
|
| 24 |
public function getSectionId(): string { |
| 25 |
return MainSection::ID; |
| 26 |
} |
| 27 |
|
| 28 |
public function getAttributes(): array { |
| 29 |
return array( |
| 30 |
'label' => __( 'Minimum Order Quantity', 'tier-pricing-table' ), |
| 31 |
'property' => 'tiered_pricing_minimum_quantity', |
| 32 |
'min' => 1, |
| 33 |
); |
| 34 |
} |
| 35 |
|
| 36 |
public function isCustomBlock(): bool { |
| 37 |
return false; |
| 38 |
} |
| 39 |
|
| 40 |
public function wrapToPremium(): bool { |
| 41 |
return ! tpt_fs()->can_use_premium_code(); |
| 42 |
} |
| 43 |
} |
| 44 |
|