| 1 |
<?php namespace TierPricingTable\Addons\GlobalTieredPricing\CPT\Columns; |
| 2 |
|
| 3 |
use TierPricingTable\Addons\GlobalTieredPricing\GlobalPricingRule; |
| 4 |
|
| 5 |
class AppliedQuantityRules { |
| 6 |
|
| 7 |
public function getName(): string { |
| 8 |
return __( 'Quantity limits', 'tier-pricing-table' ); |
| 9 |
} |
| 10 |
|
| 11 |
public function render( GlobalPricingRule $rule ) { |
| 12 |
|
| 13 |
$notSetLabel = __( 'N/A', 'tier-pricing-table' ); |
| 14 |
|
| 15 |
$minimum = $rule->getMinimum() ? $rule->getMinimum() : $notSetLabel; |
| 16 |
|
| 17 |
?> |
| 18 |
<div style="margin-bottom: 12px;"> |
| 19 |
<div style="display: flex; flex-wrap: wrap; gap: 4px;"> |
| 20 |
<span style="display: inline-block; padding: 2px 8px; background: #f0f0f1; border-radius: 3px; font-size: 12px; color: #3c434a; border: 1px solid #dcdcdc; line-height: 1.4;"> |
| 21 |
<?php esc_html_e( 'Minimum:', 'tier-pricing-table' ); ?> <b><?php echo esc_html( $minimum ? esc_html( $minimum ) : $notSetLabel ); ?></b> |
| 22 |
</span> |
| 23 |
</div> |
| 24 |
</div> |
| 25 |
<?php |
| 26 |
} |
| 27 |
} |
| 28 |
|