Siteground has WP-CLI installed and when you have WooCommerce installed it adds its own set of WP-CLI commands.
See this:
https://github.com/woocommerce/woocommerce/wiki/WC-CLI-Overview
With this your solution would be cleaner as it would go though WC’s API.
Maybe you can also check for ideas how WC does it. I remember in the add/edit product UI there was a link to (re)generate variations but there was limit I think.
Related Posts:
- Steps to optimize WordPress in regard to server load and website speed?
- Website is slow: advice on optimization
- Can we have a post without a slug?
- How to properly insert a stylesheet in wp_head
- Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
- Could a higher number of registered image sizes affect performance?
- Page taking time in loading. Also used lazy loading but doesn’t work?
- Optimizing site speed by localizing paths
- get_the_id, get_the_permalink, and get_the_title all with one DB call
- High traffic management in WP
- wp_set_post_terms() seems very slow
- admin.php taking 14 seconds
- How to optimize recaptcha__en.js
- How can I optimize my website for improved speed? [closed]
- What’s the best way to search for a UPC code in a Database?
- what does O(N) mean [duplicate]
- Big O, how do you calculate/approximate it?
- What is the difference between set and hashset in C++ STL?
- When should we use Radix sort?
- What is the best way to profile javascript execution?
- How to parallelize downloads across hostnames on WordPress?
- How to parallelize downloads across hostnames on WordPress?
- How can I debug the TTFB in WP?
- Localized WordPress is much slower?
- Long Waiting Times on GoDaddy? [closed]
- W3 Leverage browser caching not working for google pagespeed [closed]
- How many posts can I have in a WordPress website?
- Cache WordPress translations
- Use override_load_textdomain for cache translation and improve performance
- Combine JS and CSS for WordPress admin
- Is WordPress fast enough for a heavy traffic project?
- Does a WP site consumes memory resources when there are NO visitors?
- Extremely slow WordPress website with 6000 posts
- Get Y random authors’ ID/Object with more than X number of posts
- Is checking whether the blog is installed necessary?
- What is a reasonable get_num_queries() result?
- Defer Code in Widgets – Page Speed
- Disable Outbound Web Requests
- Hardcoding and WordPress Performance
- What should be disabled to run on an internal network with no access to the Internet?
- Does running WordPress on Nginx do “squat” for its performance?
- The effect of spam comments on hosting resource usage (CPU)
- How much will mounting wp-content on a separate NFS server impact performance?
- How many caching plugins should be used?
- Performance impact of using global $post
- Improve wp query perfomance on large db
- What Is The Best Method/Tool To Investigate WordPress Internal Performance?
- Do WP_debug notices explain why my site runs so slow?
- WordPress Caching On Demand
- Is there a real benefit in using wordpress optimized hosting?
- What is better to use, user meta, custom taxonomies or new database structure? [closed]
- How to disable Vary cache header on W3Total Cache plugin [closed]
- Point static content like css and js to cookieless subdomain
- upper limit on concurrent editing?
- Native Lazy Loading on Safari
- Will Gutenberg Have a Negative Impact on Page Speed?
- Identify running process that constantly use 5% CPU
- fastest replacement DB
- How accurate is P3 Plugin profiler
- Suggestion to improve slow WordPress page
- Long wait times in first part of call to WordPress on Azure
- Wordress importing scripts
- Server Hardware for WordPress [closed]
- WordPress network vs Separate installs
- Bandwidth usage increased in WordPress 3.5
- How to test site speed?
- Measure WordPress performance on different hosts
- Optimizing function that automatically creates internal links based on post title string
- WordPress Site Speed (Maybe Server Issue)
- wordpress extremely slow on NAS
- Minifing js files with w3 total cache and expiring the combined file [closed]
- Does fixing PHP notices improves website performance?
- How do I make content only load on desktop? [duplicate]
- Slow issues with Website running WordPress on Azure
- Write/saved logs in WordPress
- Favicon is loading very late
- Website slow : my fault or the host?
- Best way of coding a theme with multiple languages in WordPress
- Website Load Time takes forever
- How fast can I expect WordPress to be on a fresh install locally?
- get_template_part calls amount and performance?
- Can lots of tags affect performance?
- REST api v2 how can modify respond types and make custom DTO for better performance
- Improve WordPress performance on large number of posts
- Website is loading twice unnecessarily
- What’s the best way to dequeue / remove uncooperative scripts and styles?
- Optimising amount of calls to custom fields
- High I/O load when hosting lots of wordpress sites
- How we can reduce wordpress page loading time? [closed]
- How to Aggregate, minify and compress (AMC) static and dynamic resources?
- How to improve my site’s loading time?
- How to resolve google page speed issues for wordpress website
- How can we remove “unused”/no long used calls when loading the homepage?
- What kind of data that 3rd part dependencies using?
- Are networks now faster than disks?
- How can a single disk in a hardware SATA RAID-10 array bring the entire array to a screeching halt?
- High load average, low CPU usage – why?
- Very long initial loading (20sec)
- Identifying Issues in Pagespeed Insights: Server Response Time and Long Main Thread Tasks
- How to add fetchpriority to first 2 images in wordpress?