• We’re working on a huge online commerce webssite, using WooCommerce and two add-on plugins: WooCommerce Warehouses (to give products multiple stocks locations) and WooCommerce Prices by User Role (to give products different prices for different users). The website is also billingual (French & English) and uses WPML.

    We imported products using CSV files and everything was okay, until we realized prices in both languages were different in some cases, and we have just about no idea why. This is quite problematic.

    We thought we had a solution when we found that manually going to a product and updating it would correctly set the prices. We’ve tried looping through every product and using the “wp_update_post” function on each of them, but it takes about 1 minute for each product to update this way. This is not viable, considering the store has over 100,000 products.

    We are struggling to find solutions. Could anybody tip us in the right directon?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I ran into this under similar circumstances. Woo has a cache and it updates it as wp-cron runs.

    You can clear the cache, to some degree, from

    WOOCOMMERCE -> SYSTEM STATUS -> TOOLS

    Clear both sets of transients.

    For more specific Woo help, your best bet is

    https://www.ads-software.com/support/plugin/woocommerce

    Thread Starter kangamedia

    (@kangamedia)

    Hi Steve, ok but do I need to clear these transients each time ? I have scripts running every 2 hours.

    Can you give me more details about your steps?
    Thanks a lot

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Mine was a one-off, so I cleared the transients and use a wp-cron management plugin to locate and run the woo update price/cache/whatever cron jobs manually.

    You might check with the folks in the Woo support forum. If you’re using wpallimport pro to do the CSV import, you might check with them, too, as I’m sure this is a question they get all the time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘tried looping through every product and using the "wp_update_post" function’ is closed to new replies.