PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
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 / NonLoggedInUsers / CartRules / CartRulesSubsection.php

CartRulesSubsection.php in Tiered Pricing Table for WooCommerce 8.0.2, at src/Addons/NonLoggedInUsers/CartRules/CartRulesSubsection.php

52 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\NonLoggedInUsers\CartRules;
2
3 use TierPricingTable\Settings\CustomOptions\TPTSwitchOption;
4 use TierPricingTable\Settings\Sections\SubsectionAbstract;
5
6 class CartRulesSubsection extends SubsectionAbstract {
7
8 public function getTitle(): string {
9 return __( 'Cart rules by role', 'tier-pricing-table' );
10 }
11
12 public function getDescription(): string {
13 return __( 'A minimum order amount or quantity for the whole cart per role, and payment or shipping methods limited to roles (the two groups below). Guests count as a role; a customer with several roles gets the strictest minimum. Off by default.', 'tier-pricing-table' );
14 }
15
16 public function getSlug(): string {
17 return 'cart-rules';
18 }
19
20 public function getSettings(): array {
21 return array(
22 array(
23 'title' => __( 'Cart rules by role', 'tier-pricing-table' ),
24 'id' => CartRulesSettings::optionId( 'enabled' ),
25 'type' => TPTSwitchOption::FIELD_TYPE,
26 'default' => 'no',
27 'desc' => __( 'Applies the minimums below and the payment and shipping method limits of the next two groups in the cart and at checkout, for the classic pages and the blocks.', 'tier-pricing-table' ),
28 ),
29 array(
30 'title' => __( 'Minimum order', 'tier-pricing-table' ),
31 'id' => CartRulesSettings::optionId( 'minimums' ),
32 'type' => RoleMinimumsOption::FIELD_TYPE,
33 'desc' => __( 'Leave a cell empty for no minimum. The amount is the cart subtotal after tiered prices, before shipping.', 'tier-pricing-table' ),
34 ),
35 array(
36 'title' => __( 'Amount message', 'tier-pricing-table' ),
37 'id' => CartRulesSettings::optionId( 'amount_message' ),
38 'type' => 'text',
39 'default' => CartRulesSettings::defaultAmountMessage(),
40 'desc' => __( 'Placeholders: {minimum}, {subtotal}.', 'tier-pricing-table' ),
41 ),
42 array(
43 'title' => __( 'Quantity message', 'tier-pricing-table' ),
44 'id' => CartRulesSettings::optionId( 'quantity_message' ),
45 'type' => 'text',
46 'default' => CartRulesSettings::defaultQuantityMessage(),
47 'desc' => __( 'Placeholders: {minimum}, {count}.', 'tier-pricing-table' ),
48 ),
49 );
50 }
51 }
52