Missing "Received Orders" menu item

Hey,

I’ve not been working on my site for a while. However, yesterday, I was trying to refresh my memory and tested out registering a new vendor, creating a new listing and then purchasing the new vendor’s listing via a new buyer account that I also registered.

Everything appeared to work as intended. However, I then noticed my new vendor account (and, all of my older vendor accounts) are now missing the account menu item - “Orders Received”

All of my Vendor’s only have an “Orders” menu item which leads to the page displaying their own purchases.

Strangely, I can still see the differentiated “Received Orders” and “Placed Orders” menu items, but ONLY on my admin account.

I’ve tried temporarily removing all custom CSS, and, leaving only the HivePress plugins and WooCommerce active to try and narrow things down, but this didn’t help.

To confirm, I am able to see the corresponding booking under Bookings, and can see the Orders in the backend of WordPress/WooCommerce.

I have an unlaunched ‘real’ version of my site, and a staging version and I’ve found the issue is present on both sites.

It would be much appreciated if you can help solve this one. I can send over a temporary login, if needed.

Cheers,
Chris

Hi Chris,

Could you please let me know what WordPress, HivePress, Marketplace, and WooCommerce versions you have?

Hey @kseniia,

I’m currently running:

WordPress 6.9.1
HivePress 1.7.22
Marketplace 1.3.15
WooCommerce 10.5.1

Cheers,
Chris

Hi Chris,

Sorry for the delay. We tested this locally and couldn’t reproduce the issue, if there are no code customizations that may cause this, there may be 2 reasons:

  • Please make sure that this vendor has at least the Contributor role; this may affect the visibility of the menu items. This role should be assigned automatically when users get a vendor profile published, but maybe there were some customizations regarding this.
  • There may be confusion – currently, if the vendor has not placed an order and only received one, then the menu item has the “Orders” label instead of “Received Orders”. Two different labels are used only if the same user has at least one placed and received order.

Hope this helps

Hey,

Thanks again for looking into this for me!

After some more testing I have now managed to pinpoint which customization it is that’s causing the bug.

(It’s my custom payment/checkout option)

Apart from this bug, as far as I can tell, my custom checkout is working as intended. However, there seems to be ‘something’ missing from the checkout process in order for HivePress to fully acknowledge the order.

Like I mentioned previously, the order does complete and can be seen in the backend of WooCommerce. I can also see the relevant transaction when looking at it from the Stripe Dashboard.

To some extent HivePress is acknowledging the transaction as the ‘Bookings’ menu option appears for Vendors after an order has been placed.

However, the bug is that the ‘Orders Received’ menu item is completely missing.

If I try and visit the ‘Orders Received’ URL directly as a Vendor who’s missing the menu item, I get rerouted to the Add Listing page.

I have a developer who’s looking into this for me, and while he has a sound knowledge of WP, etc. - I don’t believe he’s familiar with HivePress itself. He’s currently comparing some of the Marketplace plugin to my custom checkout, so we can hopefully identify what’s "missing’ to sync everything together, but if you have any ideas that might help solve this, I’d be very grateful to hear them!

Re: the previous suggestions - I double-checked and can confirm the Contributor role is still being given to Vendors as expected, so that’s not preventing the menu item from appearing.

And, sorry, I should have clarified before. In my use-case, everyone is required to purchase a Membership in order to post an Ad. So, after they have finished signing up, all of my Vendors have the ‘Orders’ menu item showing as this displays their Membership purchase. (still works as intended) - I understand that the ‘Placed/Received Orders’ menu items are only broken up when appropriate.

I’ll post an update if I make any progress!

Cheers,
Chris :victory_hand:

Hi Chris,

The redirect and menu item visibility depend on whether the current vendor has any orders. Orders received by a vendor have that vendor’s user ID stored in the order’s post_author field. It’s possible that your custom code isn’t setting this user ID in the order.

You can find the code that determines the order count (which the redirect and menu item check) in hivepress-marketplace/includes/components/class-marketplace.php. This is what controls whether the vendor sees the orders section.

$order_count = Models\Order::query()->filter(
	[
		'status__in' => [ 'wc-processing', 'wc-completed', 'wc-refunded' ],
		'seller'     => get_current_user_id(),
	]
)->get_count();

Hope this helps

1 Like

Hi @kseniia,

Many thanks for your help in figuring this out!

I’ve passed on the details to my developer, so hopefully, he’ll be able to sort things out tomorrow.

I’ll keep you posted! :smiling_face:

Cheers,
Chris :victory_hand:

1 Like

Just a quick update to report my developer seems to have managed to solve this now. Thanks again for your help in resolving this!

Cheers,
Chris :victory_hand:

1 Like