There is a problem with the correct counting of package,
previously described in
When a user buys a package for 1 listing, then adds a listing, the package properly disappears.
However, when the order for listing is validated/completed by admin, the user receives the package again and thus may add the free listing incorrectly, without paying for it.
There is a bug in the file
\plugins\hivepress-paid-listings\includes\components\class-listing-package.php
Iāve tested this solution, but it doesnāt work fully. Packages are calculated correctly, but listing is also added if the payment is not completed.
I propose another change that works for me:
in file
\plugins\hivepress-paid-listings\includes\components\class-listing-package.php
( without ācompletedā - when the order status is changed to ācompletedā )
I only have instant payments and I always get the āprocessingā status after a successful payment. When I change the status of the order to ācompletedā then nothing happens, no additional package for the user is added.
For me this solves the problem of packets, so far I do not see the error of this solution.
Sorry for the confusion. It seems like it works correctly as Processing or Completed order statuses mean that payment for the order was successful so it is correct if listings become published when the order has these statuses
The problem is that if the User buys a package for one listing. After payment, the order status changes to processing. User gets package for one listing. Listing is published. The package is reset. So far it works OK.
Now me/admin changes the order status to Completed manually.
Then the User receives a free package for one listing, which should NOT happen!!!
In the code it is after changing the order status to Processing or Completed to add a package, this is probably the problem.
So in my case removing Completed helped as I described above.
See the beginning of the thread - others are reporting the same problem.