Support » Plugin: Redis Object Cache » Issue with Order/Customer CSV Export for WooCommerce

  • Resolved zamson

    (@zamson)


    Been using this plugin for a long time without trouble (the occasional flush needed here and there). How ever now I’m experiencing trouble exporting data with the plugin Order/Customer CSV Export WooCommerce by Skyverge (it exports via cronjob).

    Data gets exported with doubled rows, sometimes it’s same data point on four rows. With Redis off, the plugin works as expected. Unfortunately Skyverge and WooCommerce says they can’t do anything.

    What would be the preferred action here? Is there any way to bypass Redis? Maybe trigger a flush before each export will “solve” the problem. (I guess there is big downsides to this?)

    Please advice.

    • This topic was modified 3 years ago by zamson.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    That’s a lame answer they gave you, Because the object cache does not affect any logic, so it’s their responsibility to make sure the plugin works with a persistent object cache.

    Anyway, you’re on the right track. The easiest solution would be to flush the object cache right before you export, or alternatively turn of caching for the “cache group(s)” that the plugin is accessing.

    However because it’s premium plugin, I can’t access the source code and you’re on your own.

    I’d see or ask if there is any “action” that you can hook into right before flushing the cache, or alternatively use a broad hook like this to flush the cache before the export starts:

    
    add_action( 'init', function () {
        if ("...export request condition...") {
            wp_cache_flush();
        }
    } );
    

    If you feel comfortable sharing your files with me, I can have a look. You can reach me at till.im.

    zamson

    (@zamson)

    Thanks for getting back to me. I agree with you that they should be able to provide a better answer/solution.

    I’m sure there is a an action that I can hook into it – I’ll start with the flush approach. Your example is how I envisioned it. I’m happy to send you the files but I’m sure I’ll find the correct hook, or even better – let Woo/Skyverge work a little harder for their money.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issue with Order/Customer CSV Export for WooCommerce’ is closed to new replies.