| @@ -87,9 +87,10 @@ | ||
| 87 | 87 | 'plugin_version' => $fs->get_plugin_version(), |
| 88 | 88 | // Billing cycle. |
| 89 | 89 | 'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ), |
| 90 | 90 | 'is_network_admin' => fs_is_network_admin() ? 'true' : 'false', |
| 91 | - 'currency' => $fs->apply_filters( 'default_currency', 'usd' ), | |
| 91 | + 'currency' => $fs->apply_filters( 'default_currency', 'usd' ), | |
| 92 | + 'discounts_model' => $fs->apply_filters( 'pricing/discounts_model', 'absolute' ), | |
| 92 | 93 | ) ); |
| 93 | 94 | |
| 94 | 95 | $use_external_pricing = $fs->should_use_external_pricing(); |
| 95 | 96 | |
| @@ -121,15 +122,14 @@ | ||
| 121 | 122 | <?php if ( ! $use_external_pricing ) : ?> |
| 122 | 123 | <div id="fs_pricing_wrapper" data-public-url="<?php echo trailingslashit( dirname( $pricing_js_url ) ) ?>"></div> |
| 123 | 124 | <?php |
| 124 | 125 | $pricing_config = array_merge( array( |
| 125 | - 'contact_url' => $fs->contact_url(), | |
| 126 | - 'is_network_admin' => fs_is_network_admin(), | |
| 127 | - 'is_production' => ( defined( 'WP_FS__IS_PRODUCTION_MODE' ) ? WP_FS__IS_PRODUCTION_MODE : null ), | |
| 128 | - 'menu_slug' => $fs->get_menu_slug(), | |
| 129 | - 'mode' => 'dashboard', | |
| 130 | - 'fs_wp_endpoint_url' => WP_FS__ADDRESS, | |
| 131 | - 'request_handler_url' => admin_url( | |
| 126 | + 'contact_url' => $fs->contact_url(), | |
| 127 | + 'is_production' => ( defined( 'WP_FS__IS_PRODUCTION_MODE' ) ? WP_FS__IS_PRODUCTION_MODE : null ), | |
| 128 | + 'menu_slug' => $fs->get_menu_slug(), | |
| 129 | + 'mode' => 'dashboard', | |
| 130 | + 'fs_wp_endpoint_url' => WP_FS__ADDRESS, | |
| 131 | + 'request_handler_url' => admin_url( | |
| 132 | 132 | 'admin-ajax.php?' . http_build_query( array( |
| 133 | 133 | 'module_id' => $fs->get_id(), |
| 134 | 134 | 'action' => $fs->get_ajax_action( 'pricing_ajax_action' ), |
| 135 | 135 | 'security' => $fs->get_ajax_security( 'pricing_ajax_action' ) |
| @@ -134,10 +134,11 @@ | ||
| 134 | 134 | 'action' => $fs->get_ajax_action( 'pricing_ajax_action' ), |
| 135 | 135 | 'security' => $fs->get_ajax_security( 'pricing_ajax_action' ) |
| 136 | 136 | ) ) |
| 137 | 137 | ), |
| 138 | - 'selector' => '#fs_pricing_wrapper', | |
| 139 | - 'unique_affix' => $fs->get_unique_affix(), | |
| 138 | + 'selector' => '#fs_pricing_wrapper', | |
| 139 | + 'unique_affix' => $fs->get_unique_affix(), | |
| 140 | + 'show_annual_in_monthly' => $fs->apply_filters( 'pricing/show_annual_in_monthly', true ), | |
| 140 | 141 | ), $query_params ); |
| 141 | 142 | |
| 142 | 143 | wp_add_inline_script( 'freemius-pricing', 'Freemius.pricing.new( ' . json_encode( $pricing_config ) . ' )' ); |
| 143 | 144 | ?> |
| @@ -205,5 +206,5 @@ | ||
| 205 | 206 | 'module_type' => $fs->get_module_type(), |
| 206 | 207 | 'module_slug' => $slug, |
| 207 | 208 | 'module_version' => $fs->get_plugin_version(), |
| 208 | 209 | ); |
| 209 | - fs_require_template( 'powered-by.php', $params ); | |
| 210 | + fs_require_template( 'powered-by.php', $params ); | |