WooCommerce Order Doesn't Exist - wordpress

In the last couple of days I found two orders that are missing from WooCommerce but were processed and approved by Authorize.net including full order details plus Customer Billing Information. Although an order number is included in the Aauthorize.net information, it does not exist in WooCommerce.
What can we do to pinpoint the issue? We have thousands of orders but so far only two are missing. There are orders before and after the missing ones and I'm not running any custom code or plugins that run after checkout.

Related

Is it possible (error?) that woocommerce automatically deletes a product from an old order?

I deleted products from the shop and emptied the trash (not me, but the automatic function in woocommerce). Then products DISAPPEARED from some orders! Not all products, only 1-1 products were deleted by the system from some orders.
These are old orders, but the time between the order and execution is long, so the order data is needed for a long time. These are not yet fulfilled orders, they are in custom status.
Fortunately, I have regular backups, so I was able to view the original state and put the product back again.
BUT I have a lot of orders and now I'm afraid that the phenomenon will happen again.
Have you ever heard of this? Is there such a built-in feature in woocommerce?
I looked for similar cases online, but couldn't find any. I hope someone knows what caused this to me.

Woocommerce Subscriptions and synced force sell doesn't work?

I'm trying to create a situation in which a guarantee (no VAT) is automatically added to the cart when you order a variable subscription product. This should be done only one with the first transaction, not with the next payment in the subscription, therefore a grouped product construction.
I try to do this with the plugins mentioned above, but it simply doesn't appear in the shopping cart.
Any idea why and how to fix it?
For the grouped product, see also: https://www.rentyourmac.com/product/the-master-macbook-test-subscription/

How to get bestselling and favorites products in rest API in woocommerce?

I want to get bestselling and favorites products from woocommerce site with rest API .
I read this site but not found any thing about that.
Does it exist any way to get that ?
For People Who are Still Stumbling upon this Question
As per WC v3 API. You can now pull Most Popular products through the API (which is the best selling product list as per my understanding);
GET /wp-json/wc/v3/products?orderby=popularity&order=desc
This should get you the most popular products in descending order by the number of sales. This is not currently documented (as of Feb 2, 2021).
Total list of possible orderby params are: date, id, include, title, slug, modified, menu_order, price, popularity, rating
Another part of the question asks for Favorite product API, which woo commerce doesn't have.
I can see that you can access bestsellers through reports. See here. As for favourites, I think this is done using third party plugins or custom code so I'm not sure how you are going to access this. But if I was to hazard a guess I would probably assume it would be under customer meta

Woocommerce checkout process creating new order at payment

I'm having a problem with WordPress/Woocommerce creating a second order for customers. This is leading to a couple issues that I'll outline below. Here is the process I am following:
Create and populate new Woocommerce Subscription object
Create new renewal order (this will be ID 1033 below) and send invoice to customer
Customer logs in and finds the pending order in My Account page
Customer opens the pending order and it is populated with the correct products and price. Customer pays the correct amount
After payment, customer is on the receipt screen but it is for a new order. The old order is still sitting on their account as pending.
After looking at the access log, I can see this:
Here is the entry link (pre-payment): /checkout/order-pay/1033
And here is the review link (post-payment): /checkout/order-received/1055
The problems I am encountering are:
I have tested completing payments more than dozen times and was only able to replicate it the first time. I have followed those same steps as much as possible to no avail (all other transactions are processing as expected without creating extra orders)
The initial order is connected to a subscription, and upon completed payment the subscription is set to automatic payments. This issue of having a new order is detaching it, and automatic payments cannot be enabled until after the next payment is processed (a month later), and will rely on the customer manually submitting the order again.
Does anyone have any idea why WordPress/Woocommerce is creating a second order upon payment.
I was having the same issue with renewal payments getting applied to a new order. In my case, I was consistently having this issue with manually added subscriptions, as well as with imported subscriptions.
After working with Woocommerce Subscriptions Support, they came out with an update (version 2.1.0) solving the issue for me. Their change log references the fix.
Fix: Do not create new orders when processing a renewal and resubscribe payment with different details to the original order by ensuring the cart hash used by WooCommerce is updated when creating the order. (PR#1687)
Try updating Woocommerce Subscriptions to version 2.1.0.

WooCommerce - wrong Product saved in Order

i have a shop running on the latest WC release. I've cross checked the following error via disabling all plugins, and switching themes.
A Consumer adds products to his cart. Cart looks fine
He Proceeds to Checkout. Cart looks fine
He processes payment und places his order. Cart looks fine
After the order has been received, a wrong Product is saved in the Order, all E-Mails are wrong, and the subtotals are calculated on the wrong product. Only the correct produt-name is shown, whilst prices and skus are from the wrong (always the same) product.
What i have already checked :
Deactive all Plugins except WC
Use Default Theme
Clear all Transient Caches
Any Ideas?
Thanks
Florian
Well, this one was really tricky.
The initial store was setup via a migration from xt:commerce.
So all historical orders where migrated to Woo.
There where several entries in woocommerce_order_items and woocommerce_order_itemmeta tables which had double or misleading keys
i did a backup of theses tables, truncated/emptied and magic happend ...

Resources