free trail does not work with fixed price
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Bhartendra on August 15, 2022, 17:45Hi Team,
I got into problem when customer order in any other currency than the base currency EURO.
Example :
Customer buy a subscription in Europe get 7 day free trial.
Customer buy from UK did not get free trail and charged immediately.Any idea what to do?
Hi Team,
I got into problem when customer order in any other currency than the base currency EURO.
Example :
Customer buy a subscription in Europe get 7 day free trial.
Customer buy from UK did not get free trail and charged immediately.
Any idea what to do?
Quote from Pablo Borysenco on August 16, 2022, 10:55Hello
Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png
Drop me exact link to the issue
if you use fixed prices - yes it may not work because these are prices that do not change - that's the point of fixed prices
Hello
Please paste your license key here - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130614.png
Drop me exact link to the issue
if you use fixed prices - yes it may not work because these are prices that do not change - that's the point of fixed prices
Quote from Bhartendra on August 16, 2022, 11:05Hi Pablo,
I have added the purchase code.
Yes you are right I am using fixed prices which is not supporting subscription free trial.
i am think of using hook
woocommerce_before_calculate_totalsto set the prices for free trial product, do you think its a good idea?
Hi Pablo,
I have added the purchase code.
Yes you are right I am using fixed prices which is not supporting subscription free trial.
i am think of using hook
woocommerce_before_calculate_totals
to set the prices for free trial product, do you think its a good idea?
Quote from Pablo Borysenco on August 16, 2022, 13:25unfortunately I don't know, it depends on how the subscription plugin forms the price. But I think this plugin should have its own hook for free trial
unfortunately I don't know, it depends on how the subscription plugin forms the price. But I think this plugin should have its own hook for free trial
Quote from Bhartendra on August 18, 2022, 17:40this is my solution to the problem. if someone find better way let me know.
Below solution is based on variable subscription with free_trial attribute. Main thing is minus the price of subscription from cart if it has free trial set.add_action( 'woocommerce_after_calculate_totals', 'woocommerce_after_calculate_totals_fixed_price_free_trial_fix', 10000000, 1 );function woocommerce_after_calculate_totals_fixed_price_free_trial_fix(){global $WOOCS;$cart = WC()->cart;$totalBefore = WC()->cart->get_total('noview');$total = $totalBefore;if(WC_Subscriptions_Cart::cart_contains_subscription() && $WOOCS->current_currency !== $WOOCS->default_currency){$recurring_carts = wc()->cart->recurring_carts;foreach ($recurring_carts as $cart_item_key => $cart_item) {$fixedprice_free_trial = false;foreach($cart_item->cart_contents as $cart_item_key1 => $cart_item1){if(isset($cart_item1["variation"])){foreach($cart_item1["variation"] as $key => $value){if($key == "attribute_free_trial" && $value === "true"){$fixedprice_free_trial = true; // if not free trail no need to add the price as cart total already include subscription price}}}if($fixedprice_free_trial){$itemPrice = $cart_item->get_totals()['total'];$total = $total - $itemPrice;}}}if($totalBefore != $total){WC()->cart->set_total($total);}}}
this is my solution to the problem. if someone find better way let me know.
Below solution is based on variable subscription with free_trial attribute. Main thing is minus the price of subscription from cart if it has free trial set.
Quote from Pablo Borysenco on August 19, 2022, 09:55Hello
Great! Thank you for cooperation!
Hello
Great! Thank you for cooperation!