← All changes
|
libraries/freemius/includes/managers/class-fs-checkout-manager.php
+9
-0
3.3.3
→
3.4
View file →
| @@ -111,8 +111,17 @@ | ||
| 111 | 111 | $is_premium = false; |
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | + // Override the checkout context with the add-on's purchase details so the checkout flow is initialized for the selected add-on instead of the parent product. | |
| 116 | + $context_params['plugin_id'] = $plugin_id; | |
| 117 | + | |
| 118 | + foreach ( array( 'plan_id', 'pricing_id', 'billing_cycle', 'is_trial' ) as $param ) { | |
| 119 | + if ( fs_request_has( $param ) ) { | |
| 120 | + $context_params[ $param ] = fs_request_get( $param ); | |
| 121 | + } | |
| 122 | + } | |
| 123 | + | |
| 115 | 124 | // Get site context secure params. |
| 116 | 125 | if ( $fs->is_registered() ) { |
| 117 | 126 | $site = $fs->get_site(); |
| 118 | 127 | |