-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Discussed in #2934
Originally posted by sazz-pranto October 15, 2025
Summary:
When using the [dokan-stores orderby="random"] shortcode or selecting the “Random” option from the store listing filter, the randomization only occurs once. Upon page reload, the same store order persists instead of being reshuffled.
For a true random sorting experience, the store order should change dynamically on every page load or refresh.
Video Reference:
🎥 https://d.pr/v/NPnIoN
Steps to Reproduce:
- Go to a page using the shortcode [dokan-stores orderby="random"] or use the filter option on the store listing page to view the stores in a random order.
- Observe that the stores are displayed in a random order.
- Refresh the page — the order remains exactly the same instead of changing randomly.
Expected Behavior:
- Each time the store listing page is loaded or refreshed, the stores should be displayed in a different random order.
- The random sorting should dynamically reshuffle results on each page load to provide a varied and fair display of vendors.
Observed Behavior:
Random sorting occurs only once, and the same order persists on subsequent page reloads. The randomization is likely being cached or executed based on a single static query result, likely tied to store name or cached SQL seed.
System Status:
Dokan: v4.1.1
WooCommerce: v10.2.2
WordPress: v6.8.2