getMainSettings() ); $sectionTitle = array( 'title' => __( 'Calculations', 'tier-pricing-table' ), 'desc' => __( 'This section controls how tiered pricing does calculations.', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'calculation_logic', 'type' => 'title', ); $sectionEnd = array( 'type' => 'sectionend', ); $settings[] = $sectionTitle; $settings = array_merge( $settings, $advanced ); $settings[] = $sectionEnd; return array_merge( $settings, $this->getGlobalPricingRulesOptions() ); } public function getMainSettings(): array { return array( array( 'title' => __( 'Combine variations for quantity calculation', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'summarize_variations', 'type' => TPTSwitchOption::FIELD_TYPE, 'default' => 'no', 'extended_description' => __( 'Treat all variations of a variable product as the same item when calculating the total cart quantity for tiered pricing rules.', 'tier-pricing-table' ), 'desc_tip' => true, ), array( 'title' => __( 'Calculate percentage discounts from regular price', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'calculate_discount_based_on_regular_price', 'type' => TPTSwitchOption::FIELD_TYPE, 'extended_description' => $this->getCalculateDiscountDescription(), 'default' => 'no', ), array( 'title' => __( 'Round calculated prices', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'round_price', 'type' => TPTSwitchOption::FIELD_TYPE, 'default' => 'yes', 'extended_description' => __( 'Round calculated percentage discounts to prevent minor display discrepancies with standard WooCommerce pricing.', 'tier-pricing-table' ), 'desc_tip' => true, ), ); } public function getCalculateDiscountDescription() { ob_start(); ?>