Issue:
- 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 - THIS IS THE ERROR
I first reached out to your support with the bug on 22nd April 2023.
This is the same issue that has been reported here (and by other users on the forum going back to last year): Problem with reducing the package limit (+solution) - #6 by Dominik
@yevhen acknowledges in that thread on 8th Feb 2023 that this is a bug and is going to be fixed as soon as possible.
The user reporting this issue in that thread also provides a root cause and a workaround that I have applied and tested and found to be working in my most recent thread on this issue:
Here is the workaround:
What have I done that solved this problem for me:
in file
\plugins\hivepress-paid-listings\includes\components\class-listing-package.phpthere is
if ( in_array( $new_status, [ ‘processing’, ‘completed’ ], true ) ) {
Changed to:
if ( in_array( $new_status, [ ‘processing’ ], true ) ) {
( 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.
Steps to reproduce
See my email in your support inbox titled ‘Return customers not taken to select package page’ for exact steps and videos.
Actual result
Once the user’s order has been changed from processing to complete they are given a free listing - the next time they post a listing they are not taken to the package selection or payment page as they’ve been given this free package.
Expected result
User should be taken to the package selection page and then payment page.
Extra details
This has been reported by many other users going back to last year:
https://community.hivepress.io/t/user-listing-submitted-without-selecting-package/4344
Questions for HivePress support:
- Are there any downsides to the workaround above? ie does removing ‘completed’ from the function cause anything else to not behave as it is designed to?
- If you next update this plugin and haven’t changed this particular piece of code will my code revert to your version of it?
- Will the customers who have purchased and submitted listings with me prior to me applying the workaround still suffer from this issue when they come back for their second listing?
- If so is there anything that can be done to remove this additional package they received when changing the status of the order to complete?
- Do you have an internal ticket open for this issue?
- If so, when will the fix be built and rolled out?
@ihor you’ve been so helpful in the past - I’m hoping you can provide a permanent fix for this issue.