v1.0-release

This commit is contained in:
Yuri
2025-11-18 23:16:28 +01:00
parent 271960206c
commit 0b15c1cbf7
6 changed files with 258 additions and 9 deletions
+17 -4
View File
@@ -130,6 +130,16 @@ class WHMCS_Pricing_Shortcodes {
$classes[] = $custom_class;
}
// Get global settings
$settings = get_option('whmcs_pricing_settings', array());
$hide_currency_symbol = isset($settings['hide_currency_symbol']) && $settings['hide_currency_symbol'];
$hide_billing_cycle = isset($settings['hide_billing_cycle']) && $settings['hide_billing_cycle'];
// Override billing cycle display based on global setting
if ($hide_billing_cycle) {
$show_cycle = false;
}
$cycle_text = $show_cycle ? $this->get_cycle_text($billing_cycle, $lang) : '';
$html = sprintf(
@@ -139,10 +149,13 @@ class WHMCS_Pricing_Shortcodes {
esc_attr($billing_cycle)
);
$html .= sprintf(
'<span class="currency-symbol">%s</span>',
esc_html($price_data['symbol'])
);
// Only show currency symbol if not hidden
if (!$hide_currency_symbol) {
$html .= sprintf(
'<span class="currency-symbol">%s</span>',
esc_html($price_data['symbol'])
);
}
$html .= sprintf(
'<span class="price-amount">%s</span>',