Public Ticket #5000239

username fallback for vendor name

Open
Comments
4 Tickets 1
Dean John started the conversation 6 days ago on Thursday at 1:37am

Hi,

I've identified a concern with how MarketKing handles vendor names.

From inspecting the plugin functionality, it appears that when the `marketking_store_name` field is empty, MarketKing falls back to the WordPress user's `display_name`.

In many installations, this is simply the account username.

This raises concerns about usernames potentially being exposed in customer-facing areas, including:

- Single product pages (Vendor Details).
- Shopping cart, Mini Cart & Checkout (Products sold by).
- Vendor information displayed throughout the storefront.

Surely, if a vendor hasn't configured a Store Name, the plugin should return an empty value rather than expose their WordPress username or account display name?

WordPress usernames are not intended to be public-facing vendor identities.

Could you confirm whether this fallback is intentional throughout the frontend, and whether an option could be provided to suppress it?

Ideally, the plugin should display the configured Store Name when available and otherwise leave the vendor name blank.

Thanks,
Dean

2,765
KingsPlugins replied 5 days ago on Thursday at 3:00pm

Hi Dean,

Thanks for raising this,

To clarify, the current fallback is intentional. WordPress treats the display name as public-facing, and MarketKing uses it to avoid empty vendor labels. The Store Name is also required during the standard vendor registration process.

That said, if you'd prefer to show a dash whenever a vendor's Store Name is empty, you can add this snippet to your child theme's functions.php file or through a code snippets plugin:

Code snippet (backup)

 

Let me know if that works for you,

Kind Regards,
Stefan

4 Tickets 1
Dean John replied 5 days ago on Thursday at 4:00pm

Thanks for the placeholder snippet. That covers vendors with an empty Store Name. It doesn't cover our case, which is products that don't belong to a marketplace vendor. For those, the cart, order pages, shipping package label and order emails show the product author's display name as the seller (staff name, e.g. "Products sold by Dean John", "Shipping : Dean John"). We want "Sitex Direct" there. It looks like get_store_name_display() falls back to display_name for any user, vendor or not. A setting for a default seller name for non-vendor products would help; for now we handle it with a small filter.

While testing the marketplace end to end, we also found several other issues. Each is currently handled by a small snippet on our side, but a fix in the plugin would be better:

1. Vendor order notes fail with "-1". When a vendor adds or deletes an order note, the request uses MarketKing's add-order-note nonce, but WC_AJAX::add_order_note then requires the edit_shop_orders capability, which vendors don't have, so it returns -1 and the note isn't saved.

2. Vendor packing slip / invoice PDF gives "You do not have sufficient permissions". With PDF Invoices & Packing Slips for WooCommerce, the access check requires manage_woocommerce_orders / edit_shop_orders, so a vendor can't open the PDF even for their own order.

3. Tracking number missing from the customer's order emails. A shipment created in the vendor dashboard is stored only in the marketking_shipment_history order meta. It isn't passed to WooCommerce Shipment Tracking, so our "order completed / dispatched" email template can't show it. The customer only gets the plain order note ("A new shipment was created. Provider: DHL Tracking Number..."), which arrives squashed onto one line. A hook or filter after the shipment is saved would let us pass it on.

4. Two refund buttons for customers. MarketKing's "Request refund" shows on all orders, including orders from our own store that have no vendor, next to our own refund-request plugin (LC Refund Requests for WooCommerce). A customer who clicks the wrong one sends the request to the wrong place. We now hide it on non-marketplace orders using the marketking_allow_refund_request_order filter. Could the plugin only show it on orders that belong to a vendor?

5. No email to the site admin about refunds. The new-refund email goes only to the vendor, and nothing is sent when a vendor approves or rejects a request. We now get alerts from a snippet. A setting for an admin notification address and approval/rejection emails would be helpful.

If any of these is already planned, or if you'd rather I send them as separate tickets, just let me know.

Kind regards,
Dean

2,765
KingsPlugins replied 2 days ago on Monday at 12:31pm

Hi Dean,

Thanks for getting back to me,

(1) Regarding the store name display, the solution is to configure your admin user as a vendor.

Please edit the main/original administrator account in WordPress, assign it to a MarketKing vendor group, and set its Store Name to “Sitex Direct.” Your store-owned products should be assigned to this admin account.

That will set the Sitex Direct seller name throughout the storefront.

It will also send the initial MarketKing refund notification for those orders to the administrator account, since that account will be the vendor, so this solves several issues.

 

(2) For the order-note and PDF permission errors, the updated permission handling is now included in the official MarketKing Core 2.1.90 release. Please update Core normally through Dashboard → Updates or Plugins → Installed Plugins.

 

The remaining points are separate:

- MarketKing shipment data is not currently passed to WooCommerce Shipment Tracking, so a post-save integration hook would be an enhancement.
- MarketKing supports refund requests for the admin shop as well as external vendors. If LC Refund Requests should handle your own shop orders, your existing filter is the correct way to hide the MarketKing button there.
- There are no built-in admin-copy or approval/rejection email settings for external-vendor refunds at present.

With normal payment gateways, vendor approval only sends the request to the admin backend. The admin must still process the actual refund and mark it completed. With MarketKing Stripe Connect, vendor approval automatically sends the refund to Stripe, without a second admin-approval stage. This is covered in the refund workflow documentation.

If you would like, please submit the shipment hook and additional refund email notifications as separate tickets and we can review each one independently in detail.

Kind Regards,
Stefan

Sign In