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 / UpsellsSubsection.php

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

61 lines 1.9 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\TPTSwitchOption;
4 use TierPricingTable\Settings\CustomOptions\TPTTextTemplate;
5 use TierPricingTable\Settings\Sections\SubsectionAbstract;
6 use TierPricingTable\Settings\Settings;
7
8 class UpsellsSubsection extends SubsectionAbstract {
9
10 public function getTitle(): string {
11 return __( 'Cart upsells', 'tier-pricing-table' );
12 }
13
14 public function getDescription(): string {
15 return __( 'Use cart upsell messages to encourage customers to buy more by displaying available discounts.',
16 'tier-pricing-table' );
17 }
18
19 public function getSlug(): string {
20 return 'cart-upsells';
21 }
22
23 public function getSettings(): array {
24 return array(
25 array(
26 'title' => __( 'Enabled', 'tier-pricing-table' ),
27 'id' => Settings::SETTINGS_PREFIX . 'cart_upsell_enabled',
28 'type' => TPTSwitchOption::FIELD_TYPE,
29 'default' => 'no',
30 'desc_tip' => false,
31 ),
32
33 array(
34 'title' => __( 'Template', 'tier-pricing-table' ),
35 'id' => Settings::SETTINGS_PREFIX . 'cart_upsell_template',
36 'type' => TPTTextTemplate::FIELD_TYPE,
37 'placeholders' => array(
38 'tp_required_quantity',
39 'tp_next_price',
40 'tp_next_discount',
41 'tp_actual_discount',
42 ),
43 'default' => __( 'Buy <b>{tp_required_quantity}</b> more to get <b>{tp_next_price}</b> each',
44 'tier-pricing-table' ),
45 'desc_tip' => false,
46 'desc' => __( 'Note: This feature is not compatible with the Gutenberg Cart/Checkout blocks.',
47 'tier-pricing-table' ),
48 ),
49
50 array(
51 'title' => __( 'Upsell text color', 'tier-pricing-table' ),
52 'id' => Settings::SETTINGS_PREFIX . 'cart_upsell_color',
53 'type' => 'color',
54 'default' => '#96598A',
55 'css' => 'width:6em;',
56 'desc_tip' => false,
57 ),
58 );
59 }
60 }
61