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
← All changes | src/Settings/Sections/GeneralSection/Subsections/ProductPagePriceSubsection.php +32 -15 6.1.0 → 8.0.2 View file →
@@ -8,13 +8,13 @@
8 8
9 9 class ProductPagePriceSubsection extends SubsectionAbstract {
10 10
11 11 public function getTitle(): string {
12 - return __( 'Price on the product page', 'tier-pricing-table' );
12 + return __( 'Single Product Page Pricing', 'tier-pricing-table' );
13 13 }
14 14
15 15 public function getDescription(): string {
16 - return __( 'Control how the product price with tiered pricing will look and behave on the product page.',
16 + return __( 'Manage how tiered prices are displayed and behave on single product pages.',
17 17 'tier-pricing-table' );
18 18 }
19 19
20 20 public function getSlug(): string {
@@ -21,44 +21,61 @@
21 21 return 'product_page_price';
22 22 }
23 23
24 24 public function getSettings(): array {
25 + $price = function ( $amount ) {
26 + return wp_strip_all_tags( wc_price( $amount ) );
27 + };
28 +
25 29 return array(
26 30 array(
27 - 'title' => __( 'Price behaviour', 'tier-pricing-table' ),
31 + 'title' => __( 'Price display format', 'tier-pricing-table' ),
28 32 'id' => Settings::SETTINGS_PREFIX . 'product_page_price_format',
29 33 'type' => TPTDisplayType::FIELD_TYPE,
30 34 'options' => array(
31 - 'same_as_catalog' => __( 'Match catalog display (price range or lowest price)', 'tier-pricing-table' ),
32 - 'custom' => __( 'Dynamic', 'tier-pricing-table' ),
35 + 'same_as_catalog' => __( 'Match Shop & Categories display (price range or lowest price)', 'tier-pricing-table' ),
36 + 'custom' => __( 'Actual price for selected quantity', 'tier-pricing-table' ),
33 37 ),
38 + 'descriptions' => array(
39 + /* translators: %s: example price */
40 + 'same_as_catalog' => sprintf( __( 'e.g. "From %s" or a price range, as on the shop page', 'tier-pricing-table' ), $price( 10 ) ),
41 + /* translators: %s: example price */
42 + 'custom' => sprintf( __( 'e.g. %s when 50 pieces are selected', 'tier-pricing-table' ), $price( 12 ) ),
43 + ),
34 44 'default' => ServiceContainer::getInstance()->getSettings()->get( 'tiered_price_at_product_page',
35 45 'no' ) === 'yes' ? 'same_as_catalog' : 'custom',
36 46 ),
37 47 array(
38 - 'title' => __( 'Show actual price', 'tier-pricing-table' ),
48 + 'title' => __( 'Update price on quantity change', 'tier-pricing-table' ),
39 49 'id' => Settings::SETTINGS_PREFIX . 'update_price_on_product_page',
40 50 'type' => TPTSwitchOption::FIELD_TYPE,
41 51 'default' => 'yes',
42 - 'desc' => __( 'The product price is automatically updated when a new price tier is reached.',
52 + 'desc' => __( 'Automatically update the main product price whenever a customer changes the quantity input.',
43 53 'tier-pricing-table' ),
44 54 ),
45 55 array(
46 - 'title' => __( 'Show tiered price as a discount', 'tier-pricing-table' ),
56 + 'title' => __( 'Show original price crossed out', 'tier-pricing-table' ),
47 57 'id' => Settings::SETTINGS_PREFIX . 'show_tiered_price_as_discount',
48 58 'type' => TPTSwitchOption::FIELD_TYPE,
49 59 'default' => 'yes',
50 - 'desc' => __( 'When a tiered price is applied, the original price will be crossed out and the discounted price shown.',
60 + 'desc' => __( 'Cross out the regular price and show the discounted tiered price next to it when a higher quantity is selected.',
51 61 'tier-pricing-table' ),
52 62 ),
53 63 array(
54 - 'title' => __( 'Show total price', 'tier-pricing-table' ),
55 - 'id' => Settings::SETTINGS_PREFIX . 'show_total_price',
56 - 'type' => TPTSwitchOption::FIELD_TYPE,
57 - 'default' => 'no',
58 - 'desc' => __( 'The product price will be shown as a total price based on the selected pricing tier and quantity.',
64 + 'title' => __( 'Show total price (Price × Quantity)', 'tier-pricing-table' ),
65 + 'id' => Settings::SETTINGS_PREFIX . 'show_total_price',
66 + 'type' => TPTSwitchOption::FIELD_TYPE,
67 + 'default' => 'no',
68 + 'desc' => __( 'Multiply the main product price by the selected quantity instead of showing the per-item price.',
59 69 'tier-pricing-table' ),
60 - 'custom_attributes' => [ 'data-tiered-pricing-premium-option' => true ],
70 + ),
71 + array(
72 + 'title' => __( 'Show total price for non-tiered products', 'tier-pricing-table' ),
73 + 'id' => Settings::SETTINGS_PREFIX . 'show_total_price_non_tiered',
74 + 'type' => TPTSwitchOption::FIELD_TYPE,
75 + 'default' => 'no',
76 + 'desc' => __( 'Multiply the price by quantity even if the product has no tiered pricing rules.',
77 + 'tier-pricing-table' ),
61 78 ),
62 79 );
63 80 }
64 81