• Resolved Marcus Kober

    (@marcuskober)


    Hi there,

    I’ve written a plugin which automatically creates variations for variable products. There are a vast amount of variations (3000 – 4000 per product) and WooCommerce handles it very well.

    But after creating or updating those variants, calling the product list in backend takes very long. In my opinion that’s because on saving the variant the transients get deleted and on calling the product list calculating the min and max prices takes so long.

    Is my assumption correct? And is there a proper way building that cache programmatically? As the creation of the variants takes some time (about 2 hours, they are built in blocks of 10 via asynchronous Ajax calls), there would be also time enough to rebuild the transients.

    Would it be enough to loop over all products and call get_variation_prices?

    Thanks for pushing me in the right direction.

    Regards,
    Marcus

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support mouli a11n

    (@mouli)

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    con

    (@conschneider)

    Engineer

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Build cache after creating variations’ is closed to new replies.