PluginProbe
Tiered Pricing Table for WooCommerce / 7.1.1
Tiered Pricing Table for WooCommerce v7.1.1
8.0.2 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 All 91 releases
tier-pricing-table / src / Addons / ReactProductEditorAddon / TieredPricingGroup.php

TieredPricingGroup.php in Tiered Pricing Table for WooCommerce 7.1.1, at src/Addons/ReactProductEditorAddon/TieredPricingGroup.php

26 lines 663 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\BlockTemplates\BlockInterface;
4
5 class TieredPricingGroup {
6
7 const ID = 'tiered-pricing/group';
8
9 public function __construct() {
10 add_action( 'woocommerce_block_template_area_product-form_after_add_block_general',
11 array( $this, 'addGroup' ) );
12 }
13
14 public function addGroup( BlockInterface $generalGroup ) {
15 $parent = $generalGroup->get_parent();
16
17 $parent->add_group( [
18 'id' => self::ID,
19 'order' => $generalGroup->get_order() + 5,
20 'attributes' => [
21 'title' => __( 'Tiered Pricing', 'tier-pricing-table' ),
22 ],
23 ] );
24 }
25 }
26