getMainSettings() ); return array_merge( $settings, $this->getGlobalPricingRulesOptions() ); } public function getMainSettings(): array { return array( array( 'title' => __( 'Variable products logic', 'tier-pricing-table' ), 'desc' => __( 'Control how tiered pricing handles variable products.', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'variable_products_logic', 'type' => 'title', ), 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' => __( 'Combine variations for minimum quantity', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'mix_and_match_minimum', 'type' => TPTSwitchOption::FIELD_TYPE, 'default' => 'no', 'extended_description' => __( 'Determine whether the minimum quantity requirement applies to each variation separately, or to the combined total of all variations in the cart.', 'tier-pricing-table' ), 'desc_tip' => true, ), array( 'type' => 'sectionend', 'id' => Settings::SETTINGS_PREFIX . 'variable_products_logic', ), array( 'title' => __( 'General calculations', 'tier-pricing-table' ), 'desc' => __( 'Control general calculation behavior for tiered pricing.', 'tier-pricing-table' ), 'id' => Settings::SETTINGS_PREFIX . 'general_calculations', 'type' => 'title', ), 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, ), array( 'type' => 'sectionend', 'id' => Settings::SETTINGS_PREFIX . 'general_calculations', ), ); } public function getCalculateDiscountDescription() { ob_start(); ?>