svr101
Forum Replies Created
-
custom header: The JWT plugin let’s me define what header name I want to use as auth header. I use X-{sitename}-Auth.
That’s the thing. It works as it should, but the clear cart endpoint.
(I’m using: get cart, add item to cart, remove item, calculate shipping, set shipping methods, check coupon, apply coupon)
That’s why I’m asking what might be the issue
That’s not ideal, using 2 jwt solutions for one site (I need to get other data that is not coming from CoCart)
So I did some testing.
If I use Insomnia with my custom header AND ‘Authorization’ the cart gets cleared fine, but when I do it from nextjs it did not…
Both using “Bearer {token}” as value
Will this work with the rest of the WC routes or only with the CoCart ones?
Thanks for the tipp, will try it on the weekend.
Thanks!
I’m using this -> https://simplejwtlogin.com/ for the JWT and Nextjs 13 as my frontend.
Let me know if you need any more info.
It was authorized.
Forum: Plugins
In reply to: [WooCommerce] countries and continents localized with REST APIHello,
I have the Pro version, I reached out to the and they don’t support it.
So is there any way to get the localized data through the mentioned endpoints?
thanks!
Forum: Plugins
In reply to: [WooCommerce] Retrieve continent data rest api endpoint response mismatchThis is a quite simple topic. I’m making a request, the response is wrong.
Even your documentation says:
name string Full name of country.
In the response I’m getting is the currency name.Forum: Plugins
In reply to: [WooCommerce] Rest API + free shipping couponHello,
So. I’m using the PUT endpoint
https://mysite.com/wp-json/wc/v3/orders/1308
with this payload:
{"coupon_lines":[{"code":"YE58HUW4"}],"id":1308}
The coupon has the free shipping enabled.
The free shipping is enabled for the shipping zone. (The enabled region is Hungary)I’m posting the shipping and billing address like this:
{ "id": 1308, "billing": { "first_name": "fname", "last_name": "last name", "address_1": "teszt 1", "address_2": "", "city": "Budapest", "state": "BU", "postcode": "1016", "country": "HU", "email": "valid email", "phone": "phone number" }, "shipping": { "first_name": "fname", "last_name": "lastname", "address_1": "teszt 1", "address_2": "", "city": "Budapest", "state": "BU", "postcode": "1016", "country": "HU" } }
- This reply was modified 3 years, 2 months ago by svr101.
Forum: Plugins
In reply to: [WooCommerce] Rest API + free shipping couponSure, I will do it today.
Forum: Plugins
In reply to: [WooCommerce] Rest API + free shipping couponSo do you guys have any idea what causes this issue?
Forum: Plugins
In reply to: [WooCommerce] Rest API + free shipping couponHi,
No I didn’t. I just clarified some details that @rynald0s asked.
Forum: Plugins
In reply to: [WooCommerce] Rest API + free shipping couponHey,
Yes, I’m adding to the
coupon_lines
array. It does appear when I navigate to the orders details page. I can use fixed discount coupons.I followed this guide: https://woocommerce.com/document/free-shipping/
Thanks!