Last active
July 12, 2018 09:43
-
-
Save New0/b414230c89c7cc3028c7e498957e4bad to your computer and use it in GitHub Desktop.
Filter Subscription data in Direct Stripe and use trial period set in Stripe's product pricing plan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: Direct Stripe Trial Period | |
* Description: Use trial period set in a pricing plan | |
* Author: Nicolas Figueira New0 | |
* Author URI: https://newo.me | |
* Version: 0.0.1 | |
*/ | |
add_filter('direct_stripe_subscription_data', function( $subscriptiondata ) { | |
$subscriptiondata['trial_from_plan' ] = true; | |
return $subscriptiondata; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment