| 1 |
<?php namespace TierPricingTable\Addons\GlobalTieredPricing\CPT\Columns; |
| 2 |
|
| 3 |
use TierPricingTable\Addons\GlobalTieredPricing\GlobalPricingRule; |
| 4 |
|
| 5 |
class Status { |
| 6 |
|
| 7 |
public function getName(): string { |
| 8 |
return '<span class="dashicons dashicons-post-status"></span>'; |
| 9 |
} |
| 10 |
|
| 11 |
public function render( GlobalPricingRule $rule ) { |
| 12 |
if ( $rule->isSuspended() ) { |
| 13 |
?> |
| 14 |
<mark class="tpt-rule-suspend-status tpt-rule-suspend-status--suspended" |
| 15 |
title="<?php esc_attr_e( 'The rule is suspended', 'tier-pricing-table' ); ?>"> |
| 16 |
</mark> |
| 17 |
<?php |
| 18 |
} else { |
| 19 |
?> |
| 20 |
<mark class="tpt-rule-suspend-status tpt-rule-suspend-status--active" |
| 21 |
title="<?php esc_attr_e( 'The rule is active', 'tier-pricing-table' ); ?>"> |
| 22 |
</mark> |
| 23 |
<?php |
| 24 |
} |
| 25 |
} |
| 26 |
} |
| 27 |
|