# tier-pricing-table/7.1.4/src/Addons/ReactProductEditorAddon/Blocks/RoleBasedPricing.php

Tiered Pricing Table for WooCommerce, version 7.1.4. 40 lines.

- Page: https://pluginprobe.com/plugins/tier-pricing-table/7.1.4/code/src/Addons/ReactProductEditorAddon/Blocks/RoleBasedPricing.php
- Raw: https://pluginprobe.com/plugins/tier-pricing-table/7.1.4/raw/src/Addons/ReactProductEditorAddon/Blocks/RoleBasedPricing.php
- Modified: 2024-08-19T12:44:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tier-pricing-table/7.1.4/code/src/Addons/ReactProductEditorAddon/Blocks/RoleBasedPricing.php#L10-L20`.

```php
<?php namespace TierPricingTable\Addons\ReactProductEditorAddon\Blocks;

use TierPricingTable\Addons\ReactProductEditorAddon\Block;
use TierPricingTable\Addons\ReactProductEditorAddon\Sections\RoleBasedPricingSection;

class RoleBasedPricing extends Block {
	
	public function getCustomBlockFolder(): string {
		return __DIR__ . '/../js/role-based-pricing';
	}
	
	public function getId(): string {
		return 'tiered-pricing-table/product-editor-role-based-pricing';
	}
	
	public function getBlockName(): string {
		return 'tiered-pricing-table/product-editor-role-based-pricing';
	}
	
	public function getOrder(): int {
		return 10;
	}
	
	public function getSectionId(): string {
		return RoleBasedPricingSection::ID;
	}
	
	public function getAttributes(): array {
		return array(
			'availableRoles' => wp_roles()->roles,
			'isPremium'      => tpt_fs()->can_use_premium_code(),
			'upgradeUrl'     => tpt_fs_activation_url(),
		);
	}
	
	public function isCustomBlock(): bool {
		return true;
	}
}

```
