PluginProbe
Tiered Pricing Table for WooCommerce / 6.5.0
Tiered Pricing Table for WooCommerce v6.5.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 / Addons / PricingSummary / SummarySubsection.php

SummarySubsection.php in Tiered Pricing Table for WooCommerce 6.5.0, at src/Addons/PricingSummary/SummarySubsection.php

84 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\PricingSummary;
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 SummarySubsection extends SubsectionAbstract {
9
10 public function getTitle(): string {
11 return __( 'Pricing Summary', 'tier-pricing-table' );
12 }
13
14 public function getDescription(): string {
15 return __( 'Show a summary block with total cost and unit price details.', 'tier-pricing-table' );
16 }
17
18 public function getSlug(): string {
19 return 'summary';
20 }
21
22 public function getSettings(): array {
23 return array(
24 array(
25 'title' => __( 'Enable pricing summary', 'tier-pricing-table' ),
26 'id' => Settings::SETTINGS_PREFIX . 'display_summary',
27 'type' => TPTSwitchOption::FIELD_TYPE,
28 'default' => 'yes',
29 'desc_tip' => true,
30 ),
31 array(
32 'title' => __( 'Title', 'tier-pricing-table' ),
33 'id' => Settings::SETTINGS_PREFIX . 'summary_title',
34 'type' => 'text',
35 'desc' => __( 'The name is displaying above the summary block.', 'tier-pricing-table' ),
36 'desc_tip' => true,
37 'default' => '',
38 ),
39 array(
40 'title' => __( 'Position on product page', 'tier-pricing-table' ),
41 'id' => Settings::SETTINGS_PREFIX . 'summary_position_hook',
42 'type' => 'select',
43 'options' => array(
44 'woocommerce_before_add_to_cart_button' => __( 'Above buy button', 'tier-pricing-table' ),
45 'woocommerce_after_add_to_cart_button' => __( 'Below buy button', 'tier-pricing-table' ),
46 'woocommerce_before_add_to_cart_form' => __( 'Above add to cart form', 'tier-pricing-table' ),
47 'woocommerce_after_add_to_cart_form' => __( 'Below add to cart form', 'tier-pricing-table' ),
48 'woocommerce_single_product_summary' => __( 'Above product title', 'tier-pricing-table' ),
49 'woocommerce_before_single_product_summary' => __( 'Before product summary', 'tier-pricing-table' ),
50 'woocommerce_after_single_product_summary' => __( 'After product summary', 'tier-pricing-table' ),
51 ),
52 'default' => 'woocommerce_after_add_to_cart_button',
53 'desc' => __( 'Where to display the summary block.', 'tier-pricing-table' ),
54 'desc_tip' => true,
55 ),
56 array(
57 'title' => __( 'Totals template', 'tier-pricing-table' ),
58 'id' => Settings::SETTINGS_PREFIX . 'summary_type',
59 'type' => TPTDisplayType::FIELD_TYPE,
60 'options' => array(
61 'detailed' => __( 'Detailed', 'tier-pricing-table' ),
62 'table' => __( 'Reduced', 'tier-pricing-table' ),
63 'inline' => __( 'Labels', 'tier-pricing-table' ),
64 ),
65 'default' => 'table',
66 ),
67 array(
68 'title' => __( '"Total" label', 'tier-pricing-table' ),
69 'id' => Settings::SETTINGS_PREFIX . 'summary_total_label',
70 'type' => 'text',
71 'default' => __( 'Total:', 'tier-pricing-table' ),
72 'desc_tip' => true,
73 ),
74 array(
75 'title' => __( '"Each" label', 'tier-pricing-table' ),
76 'id' => Settings::SETTINGS_PREFIX . 'summary_each_label',
77 'type' => 'text',
78 'default' => __( 'Each: ', 'tier-pricing-table' ),
79 'desc_tip' => true,
80 ),
81 );
82 }
83 }
84