PluginProbe
Tiered Pricing Table for WooCommerce / trunk
Tiered Pricing Table for WooCommerce vtrunk
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
tier-pricing-table / src / Addons / ReactProductEditorAddon / Block.php

Block.php in Tiered Pricing Table for WooCommerce trunk, at src/Addons/ReactProductEditorAddon/Block.php

31 lines 763 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\ReactProductEditorAddon;
2
3 use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\BlockRegistry;
4
5 abstract class Block {
6
7 abstract public function isCustomBlock(): bool;
8
9 abstract public function getCustomBlockFolder(): ?string;
10
11 abstract public function getBlockName(): string;
12
13 abstract public function getSectionId(): string;
14
15 abstract public function getOrder(): int;
16
17 abstract public function getId(): string;
18
19 public function wrapToPremium(): bool {
20 return false;
21 }
22
23 abstract public function getAttributes(): array;
24
25 public function register() {
26 if ( $this->isCustomBlock() ) {
27 BlockRegistry::get_instance()->register_block_type_from_metadata( $this->getCustomBlockFolder() );
28 }
29 }
30 }
31