PluginProbe
Tiered Pricing Table for WooCommerce / 7.1.4
Tiered Pricing Table for WooCommerce v7.1.4
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 / views / addons / role-based-pricing / role.php

role.php in Tiered Pricing Table for WooCommerce 7.1.4, at views/addons/role-based-pricing/role.php

48 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use TierPricingTable\Addons\RoleBasedPricing\RoleBasedPricingRule;
4 use TierPricingTable\Core\ServiceContainer;
5
6 defined( 'ABSPATH' ) || die;
7
8 /**
9 * Available variables
10 *
11 * @var RoleBasedPricingRule $pricing_rule
12 * @var WC_Product $product
13 * @var int $loop
14 *
15 */
16
17 $loop = isset( $loop ) ? $loop : null;
18
19 global $wp_roles;
20
21 $roleName = isset( $wp_roles->role_names[ $pricing_rule->getRole() ] ) ? translate_user_role( $wp_roles->role_names[ $pricing_rule->getRole() ] ) : $pricing_rule->getRole();
22
23 $fileManager = ServiceContainer::getInstance()->getFileManager();
24 ?>
25
26 <div class="tpt-role-based-role tpt-role-based-role--<?php echo esc_attr( $pricing_rule->getRole() ); ?>"
27 data-role-slug="<?php echo esc_attr( $pricing_rule->getRole() ); ?>"
28 data-role-name="<?php echo esc_attr( $roleName ); ?>">
29 <div class="tpt-role-based-role__header">
30 <div class="tpt-role-based-role__name">
31 <b><?php echo esc_attr( $roleName ); ?></b>
32 </div>
33 <div class="tpt-role-based-role__actions">
34 <span class="tpt-role-based-role__action-toggle-view tpt-role-based-role__action-toggle-view--open"></span>
35 <a href="#" class="tpt-role-based-role-action--delete"><?php esc_attr_e( 'Remove', 'woocommerce' ); ?></a>
36 </div>
37 </div>
38 <div class="tpt-role-based-role__content">
39 <?php
40 $fileManager->includeTemplate( 'addons/role-based-pricing/role-pricing-form.php', array(
41 'pricing_rule' => $pricing_rule,
42 'product' => $product,
43 'loop' => $loop,
44 ) );
45 ?>
46 </div>
47 </div>
48