Support » Plugin: WooCommerce Order Search Admin » breaks standard search and fails to index some orders

  • As far as I can tell, it is only failing to index orders in pending-payment status. This would be less bad if it didn’t also prevent those orders from showing up in the basic search (non-ajax) – or do those results come from algolia as well?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author rayrutjes

    (@rayrutjes)

    Hello,

    Sorry to hear you have an issue with the plugin.

    Indeed the backend query is altered to be powered by Algolia as well in order to have a match between results of the autocomplete and the ones coming from the backend.
    You can disable the backend search following the instructions here: https://wordpress.org/support/topic/plugin-conflict-this-breaks-admin-columns-filtering-search-possibly-others/#post-11717091

    I’d be curious to know more about pending-payment statuses not being indexed.
    Do you have an idea why this would happen? Are you using any specific plugin to manage statuses? When looking at your Algolia dashboard, do you see the orders you are missing?

    Thanks for reporting the issue.

    Thread Starter bheadrick

    (@bheadrick)

    ah, that filter is useful!

    There are plugins that add order statuses, but that’s it.

    I don’t have direct access to the algolia dashboard, as the account is provided through our web host, but I might be able to get more details poking around the api with postman

    Thread Starter bheadrick

    (@bheadrick)

    I confirmed that the missing orders were, in fact, missing via searches from postman.

    I just added that filter, reactivated the plugin in production, and then reindexed orders. (from prod site)

    Now, the orders that had been missing are there. Also, newer orders that were pending-payment status are there (in algolia)

    Note that just before I noticed the problem where specific orders were missing, it looked like a few of the recent orders were missing, prompting me to perform the reindexing (from the admin panel).

    It was after this had completed that the pending-payment orders came in, and somehow failed to get indexed.

    Plugin Author rayrutjes

    (@rayrutjes)

    Thanks for the detailed information.

    I think our plugin must be failing to intercept the update of your order and thus it does not index it in Algolia.

    Our plugin listens on 3 different native hooks in order to sync the changes with Algolia: https://github.com/rayrutjes/wc-order-search-admin/blob/master/includes/class-order-change-listener.php#L26

    Sometimes however, other plugins do their own stuff on the same hook and actually short-circuit all other plugins listening on the same hook.
    There is unfortunately very little I can do to prevent that.

    Let me know if you somehow manage to identify the conflicting plugin.

    Thread Starter bheadrick

    (@bheadrick)

    “Sometimes however, other plugins do their own stuff on the same hook and actually short-circuit all other plugins listening on the same hook.”

    What would that code look like?

    Plugin Author rayrutjes

    (@rayrutjes)

    It could be anything registered on a hook that gets executed during the post saving process and that gets triggered before our code.

    Of course that code would also need to stop the processing of additional hooks for it to be a problem. It could end with a pre-emptive redirect, or do some weird things with the state of the saved post.

    I think to investigate the first step is to manage to always reproduce with simple steps, and then try turning off one plugin at a time that you think could be an issue. That is generally how I drill down the problem to a single conflicting plugin.

    It could also be that there is something that could be fixed in my plugin. But I’d need to have a way to reproduce the error.

    I hope you’re going to find a way to solve this. Let me know if I can help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘breaks standard search and fails to index some orders’ is closed to new replies.