gpourbaix
Forum Replies Created
-
Forum: Plugins
In reply to: [Subscriptions for WooCommerce] Stripe Payment Method IssueHello,
I’m not using pro version and it’s not about 3D secure because it’s clearly indicated in stripe dashboard when 3D secure is not complete.
Stripe made it very clear : the request made by the plugin was invalid as you need to attach the PaymentIntent to the customer before using it.
How can I process the payment without asking my customers to renew their subscriptions, considering they just signed up?
Additionally, how can I prevent this from happening in the future?
Forum: Plugins
In reply to: [Subscriptions for WooCommerce] invalid_request_error – StripeHello, thanks for your feedback.
I’ve just got another failure with another customer..What changes are you talking about ? Does it mean it will happen to all of my customers ?
I cannot ask them to subscribe again… There are engaged and most of them just wont do it.Any solution that would not involve customer action ?
Best regardsForum: Plugins
In reply to: [Subscriptions for WooCommerce] Issue with tax and free trialHello again,
So I came up with this filter and it worked like I needed to.
I share it in case some one else has the same issue.
It will only work if tax are activated and if tax of the subscription is at 0.
I’ve only tested in “tax included in price” mode and I think it would work only if you can buy only one subscription at the time.add_filter('wps_sfw_cart_data_for_susbcription', 'gp_fix_tax_error_from_subscription_plugin', 1); function gp_fix_tax_error_from_subscription_plugin($wps_recurring_data) { if (get_option('woocommerce_calc_taxes')== "yes" && $wps_recurring_data["line_tax"]==0) { $product_id = $wps_recurring_data['product_id']; $product = wc_get_product( $product_id ); $tax_obj = new WC_Tax(); // Get the tax data from customer location and product tax class $tax_rates_data = $tax_obj->find_rates( array( 'country' => WC()->customer->get_shipping_country() ? WC()->customer->get_shipping_country() : WC()->customer->get_billing_country(), 'state' => WC()->customer->get_shipping_state() ? WC()->customer->get_shipping_state() : WC()->customer->get_billing_state(), 'city' => WC()->customer->get_shipping_city() ? WC()->customer->get_shipping_city() : WC()->customer->get_billing_city(), 'postcode' => WC()->customer->get_shipping_city() ? WC()->customer->get_shipping_city() : WC()->customer->get_billing_city(), 'tax_class' => $product->get_tax_class() ) ); if( ! empty($tax_rates_data) ) { $taux_tva = reset($tax_rates_data)['rate']; } else { $taux_tva = 0; } $calcul_tva = 1+($taux_tva/100); $ttc_price = $wps_recurring_data["wps_recurring_total"]; $ht_price = $ttc_price/$calcul_tva; $ht_price_rounded_2 = round( $ht_price, 2 ); $tax = $ttc_price - $ht_price; $tax_price_rounded_2 = round( $tax, 2 ); $wps_recurring_data['line_subtotal_tax'] = $tax_price_rounded_2; $wps_recurring_data['line_tax'] = $tax_price_rounded_2; $wps_recurring_data['line_total'] = $ttc_price; $wps_recurring_data['line_subtotal'] = $ttc_price; $wps_recurring_data["line_tax_data"]['subtotal'][1]=$tax; $wps_recurring_data["line_tax_data"]['total'][1]=$tax; } return $wps_recurring_data; }
Best regards