Problem with reducing the package limit (+solution)

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

there is

if ( in_array( $new_status, [ ‘processing’, ‘completed’ ], true ) ) {

I think it should be with !

if ( ! in_array( $new_status, [ ‘processing’, ‘completed’ ], true ) ) {

This seems to be working correctly now.

Please check and update.

Hi,

Thanks for reporting this, the bug is already confirmed, and we’ll fix it as soon as possible.

OK, anyway paid-listings users can use this solution as a temporary fix.

1 Like