Critical error and no checkout whilst trying to feature a listing

Hey,

I tried deactivating the Paid Listings extention as I thought it was ready to be replaced with the updated Memberships extension. However, I tried creating a ‘featured’ plan which I linked to my WooCommerce product for featuring a listing.

When I tried featuring a listing with only Memberships activated, I managed to feature the listing, but I wasn’t required to checkout.

When I tried featuring the listing with Paid Listings re-activated, I got a critical error after confirming I wanted to feature the listing in the little pop-up window.

When I revisited the listing, I found it had been featured despite the critical error, though I still wasn’t made to checkout.

I’m not certain if this is a bug, or if I haven’t set things up correctly, but I’d appreciate some assistance to ensure this is set-up and behaving correctly.

My debug.log shows this:

[22-Apr-2025 13:35:09 UTC] PHP Deprecated:  stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /public_html/wp-includes/class-wp-editor.php on line 305
[22-Apr-2025 13:35:59 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, array callback must have exactly two members in /public_html/wp-content/plugins/hivepress/includes/components/class-router.php:662
Stack trace:
#0 /public_html/wp-content/plugins/hivepress/includes/components/class-router.php(662): call_user_func(Array)
#1 /public_html/wp-includes/class-wp-hook.php(324): HivePress\Components\Router->set_page_template('/public_html/...')
#2 /public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters('/public_html/...', Array)
#3 /public_html/wp-includes/template-loader.php(104): apply_filters('template_includ...', '/public_html/...')
#4 /public_html/wp-blog-header.php(19): require_once('/public_html/...')
#5 /public_html/index.php(17): require('/public_html/...')
#6 {main}
thrown in /public_html/wp-content/plugins/hivepress/includes/components/class-router.php on line 662

Hi,

We recommend that you disable the Paid Listings extension and use the new version of the Memberships extension only, as the functions are now repeated in these two extensions. We recommend debugging only the Memberships extension if there are issues. Also, make sure you add a plan with a non-zero featured limit and a linked product. Additionally, please try registering a new user after adding a plan, as admins can add featured listings without limits.

​I hope this is helpful to you

Thanks for replying, @andrii

I’ve now completely removed the Paid Listings extension. However, I’m struggling to get the listing process working as intended with the new membership extension.

I thought I’d set up a membership plan in the same way as Paid Listings worked, but when I tried adding a listing as a new test user, I found the add details screen is only displaying the category, image and description fields; and, after submitting the listing, it was made live with no plan selection page, or checkout required.

It’s hard to tell if the plugin is bugged, or if I don’t have everything set up correctly.

I want users to be able to add all of the details (including my custom attributes) > select a membership > checkout > listing goes live.

After a user has become a vendor, I’d like them to be able to edit all listing attributes.

Can you please tell me (or provide screenshots showing) what the settings in the Memberships tab of HivePress should be using. And, how my plan should be setup/restricted in the Memberships > Plans page to achieve the same functionality as how Paid Listings worked.

I’m not sure if it’s the lack of documentation or concise setting ‘tips’, but I’m finding this much harder to wrap my head around and set up correctly.

Edit:

To clarify, here’s what I’m trying to achieve:

Anyone can visit the wesbite and view listings.
Anyone can register on the site.
Users can view/interact (favourite, etc.) listings.
If desired, users can become ‘vendors’.
No listings should be able to be created for free.
When a user tries to add a listing, they are asked to select a plan then check-out before the listing goes live.
Once a plan has expired, all of the users’s listings are hidden. *

  • Ideally, the upcoming subscriptions component will allow WooSubscriptions to automatically renew the plan, and keep listings visible for users/vendors with an active subscription.

I know the subscriptions component is yet to be released, but can you please help me set up the settings to achieve this.

I think I’ve got it set-up correctly now, but for reassurance, and as a reference for others (and likely myself again in the future), it would be good if you could still provide the settings required to achieve this.

Hi,

Please note that all settings have been migrated from Paid Listings to Memberships. That is, if you want to restrict the adding listings, then in the plans, specifically in the Listings (Restrictions) section, you need to specify a non-zero limit in the Submission Limit. Then the Add Listing page will be blocked and redirected to the Select Plan page if the user does not have a membership yet. If you need to monetize the featured function, you need to add a membership plan with a nonzero Featured Limit. And the user can purchase such a plan when they click on the star icon in Account/Listings.

There is no feature to expire all listings when the membership has expired. However, there are two workarounds:

  1. Specify an expiration period in Listings (Restrictions) so that it is not possible to add listings with an unlimited publication period.

  2. We can provide a PHP snippet to make all listings expire when the membership expires.

1 Like

Hey,

Thanks again for replying, @andrii.

Yesterday I was confused about whether it was users, vendors or listings that I needed to restrict, but I think I’ve got things set-up as intended now. (I only have Listings set-up with restrictions.)

I’ve also set the Featured & Submission Limit’s to a non-zero amount as you recommended.

I’m still testing everything out, but the end goal is:

  1. When a user has an active subscription/membership their listings should not expire (or, their listings automatically renew with their subscription.)

  2. When a user’s subscription/membership is cancelled/expires, all of their listings should be unpublished (without the ability to re-publish them unless they resubscribe.)

I think I still need to wait on the upcoming WooSubscriptions component to achieve all of this, but can you confirm if this is do-able with HivePress settings, and/or provide a snippet to help achieve this.

Many thanks in advance,
Chris

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.