PluginProbe
Tiered Pricing Table for WooCommerce / 6.1.0
Tiered Pricing Table for WooCommerce v6.1.0
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 / Settings / Sections / GeneralSection / Subsections / CatalogPricesSubsection.php

CatalogPricesSubsection.php in Tiered Pricing Table for WooCommerce 6.1.0, at src/Settings/Sections/GeneralSection/Subsections/CatalogPricesSubsection.php

67 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Settings\Sections\GeneralSection\Subsections;
2
3 use TierPricingTable\Settings\CustomOptions\TPTDisplayType;
4 use TierPricingTable\Settings\CustomOptions\TPTSwitchOption;
5 use TierPricingTable\Settings\Sections\SubsectionAbstract;
6 use TierPricingTable\Settings\Settings;
7
8 class CatalogPricesSubsection extends SubsectionAbstract {
9
10 public function getTitle(): string {
11 return __( 'Price format for products with tiered pricing (in the catalog, widgets, etc.)',
12 'tier-pricing-table' );
13 }
14
15 public function getDescription(): string {
16 return __( 'Control how products with tiered pricing will show their prices outside their product pages.',
17 'tier-pricing-table' );
18 }
19
20 public function getSlug(): string {
21 return 'catalog_prices';
22 }
23
24 public function getSettings(): array {
25 return array(
26 array(
27 'title' => __( 'Format price', 'tier-pricing-table' ),
28 'id' => Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog',
29 'type' => TPTSwitchOption::FIELD_TYPE,
30 'default' => 'yes',
31 'desc' => __( 'Format price based on tiered pricing (show pricing range or minimal price).',
32 'tier-pricing-table' ),
33 'desc_tip' => true,
34 ),
35 array(
36 'title' => __( 'Format price for variable products', 'tier-pricing-table' ),
37 'id' => Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog_for_variable',
38 'type' => TPTSwitchOption::FIELD_TYPE,
39 'default' => 'no',
40 'desc' => __( 'Format price based on tiered pricing (show pricing range or minimal price) for variable products. Uses the lowest and the highest prices from all variations.',
41 'tier-pricing-table' ),
42 'desc_tip' => true,
43 ),
44 array(
45 'title' => __( 'Display price as', 'tier-pricing-table' ),
46 'id' => Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog_type',
47 'type' => TPTDisplayType::FIELD_TYPE,
48 'options' => [
49 'lowest' => __( 'Show lowest price', 'tier-pricing-table' ),
50 'range' => __( 'Show range (lowest to highest)', 'tier-pricing-table' ),
51 ],
52 'default' => 'lowest',
53 'desc' => __( 'Choose how to display tiered pricing: show only the lowest price or the full price range.', 'tier-pricing-table' ),
54 'desc_tip' => true,
55 ),
56 array(
57 'title' => __( 'The lowest price prefix', 'tier-pricing-table' ),
58 'id' => Settings::SETTINGS_PREFIX . 'lowest_prefix',
59 'type' => 'text',
60 'default' => __( 'From', 'tier-pricing-table' ),
61 'desc' => __( 'Enter a prefix that will be shown before the lowest price. For example, it can look like this: <b>From $10.00</b>',
62 'tier-pricing-table' ),
63 ),
64 );
65 }
66 }
67