dziuba
Forum Replies Created
-
Maybe this helps somebody.
I just set the status of the subscription after the checkout to active
if its a SEPA payment.add_action( 'woocommerce_thankyou', 'wc_subscription_set_active_SEPA', 50, 1 ); function wc_subscription_set_active_SEPA( $order_id ){ if( ! $order_id ) return; $order = wc_get_order( $order_id ); // Get an instance of the WC_Order object // If the order contains a subscription and is a Stripe SEPA payment if( wcs_order_contains_subscription( $order ) && $order->get_payment_method() === 'stripe_sepa' ){ // Get an array of WC_Subscription objects $subscriptions = wcs_get_subscriptions_for_order( $order_id, array( 'order_type' => 'any' ) ); foreach( $subscriptions as $subscription_id => $subscription ){ // Change the status of the WC_Subscription object $subscription->update_status( 'active', 'Set active because of SEPA.', false ); } } }Right now after
charge.succeededmy order still stays inprocessing.
Even tho it’s a virtual product.EDIT:
Got it. It also has to be a downloadable product.
Then it works.- This reply was modified 4 years, 10 months ago by dziuba.
Maybe i phrased myself a little bit misleading.
The final goal is to automaticly set the order status to ‘completed’ because the Subscriptions are virtual products.
Which i could do if i just would skip the ‘processing’ status and go directly to ‘completed’. So it would be:
‘on-hold’ -> Charge.succeeded -> ‘completed’ (skipping processing)
So ‘on-hold’ would as intended reflect a pending payment.
I could do that if i just listen on the status change like the action above.But.. Because of Subscriptions i need to skip the on-hold status to make the subscription immediately active.
So what i want is:
‘processing’ -> Charge.succeeded -> ‘completed’ (skipping on-hold)
So ‘processing’ now would reflect a pending payment.As im already in the ‘processing’ Status to begin with i would need a possibility to add an action after the Charge.succeeded webhook was processed or instead of normally changing the status from ‘on-hold’ to ‘processing’ i would need to change from ‘processing’ to ‘completed’ on a Charge.succeeded.
Really appreciate your help.
- This reply was modified 4 years, 10 months ago by dziuba.
Thank you very much for your fast support
and resolution of the problem.Hi @mrclayton
our site is still in staging mode so test can still be done.
And i didnt customize it besides some CSS changes.And i will try to express the problem better.
Our test account has a saved sepa payment with the Stripe Test IBAN DE89370400440532013000.
If we then want to make a new Order with the IBAN DE08370400440532013003 we set it as new Payment in the Checkout or we select the saved payment option.If we make the payment with the new IBAN then it gets saved but the Order will have the first IBAN selected as payment.
If we then make a third order both IBAN are available to choose from as saved payment options. If we select one of them then it works. But a new IBAN only gets saved.
Maybe this helps a bit.
Okay thank you very much for the Update. π
Ofc but im still working on it and im pretty new to these kind of things.
Im still testing and trying some things out.Thanks for you fast response. π
Im looking forward to the Update.Thats a Problem with WordPress.
It doesnt have native Multi Language Support. There is the “Semi Native” with Multisite but thats more a “workaround”.
Whats more popular is to use WPML (Paid) or Polylang (Free).
Which are 3rd party Plugins to make Themes (Which support it) and the Side supporting Multilanguages.Appreciate your work.
Dziuba
Forum: Plugins
In reply to: [Wix Hotels Online Booking System] 404 Not Found after ReservationI would be totally fine right now but the Language Switcher is missing π
Whats good about your new approach is that the Booking is now responsive.I will stay tuned for your next release π
Oh and i have an Idea.
The possibility to pay in two different currencys.
Based on the Language.And thanks for this awesome Plugin.
Forum: Plugins
In reply to: [Wix Hotels Online Booking System] 404 Not Found after ReservationHi yuvalhwix,
Thank you for your Help.
I just updated the Plugin and the Reservation now works without a Problem. π
But now the “Our Rooms” Page seams kinda broken because now there is no Design. Just Plain Text and Pictures.