Skip to content

Commit 80f48be

Browse files
committed
[pricing] [filter] [new] Add new filter to modify the default billing cycle
1 parent 63e5bd7 commit 80f48be

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

start.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @var string
1717
*/
18-
$this_sdk_version = '2.13.0';
18+
$this_sdk_version = '2.13.0.1';
1919

2020
#region SDK Selection Logic --------------------------------------------------------------------
2121

@@ -447,6 +447,7 @@ function_exists( 'wp_is_json_request' ) &&
447447
* fs_show_trial_{plugin_slug}
448448
* fs_is_pricing_page_visible_{plugin_slug}
449449
* fs_checkout/parameters_{plugin_slug}
450+
* fs_pricing/billing_cycle_{plugin_slug}
450451
*
451452
* --------------------------------------------------------
452453
*

templates/pricing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
'next' => $fs->_get_sync_license_url( false, false ),
6060
'plugin_version' => $fs->get_plugin_version(),
6161
// Billing cycle.
62-
'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
62+
'billing_cycle' => fs_request_get( 'pricing/billing_cycle', $fs->apply_filters( 'pricing/billing_cycle', WP_FS__PERIOD_ANNUALLY ) ),
6363
'is_network_admin' => fs_is_network_admin() ? 'true' : 'false',
6464
'currency' => $fs->apply_filters( 'default_currency', 'usd' ),
6565
'discounts_model' => $fs->apply_filters( 'pricing/discounts_model', 'absolute' ),

0 commit comments

Comments
 (0)