I'm developing a website in WordPress with WooCommerce. I am using Woocommerce Subscription. I have a product with a trial period. Now I want to change the next payment date based on the trial period. How can I get the trial period date and Next payment date? So that I can change the Second payment date. I tried using the below-mentioned code but didn't find any solution.
<?php if (has_woocommerce_subscription('','','active') && WC_Subscriptions_Product::get_trial_length( $product_id ) > 10) {
$trial_end = WC_Subscription::get_date( 'trial_end');
echo $trial_end;
}
?>