Issue
It was pretty wild to see 500,000 rows in the wp_options table, so I had to take a moment to take it all in.
Then I decided to dig a bit further, and that’s when I found the following transients were taking up much of the rows in the wp_options table.
transient_timeout_wc_product_loop transient_wc_product_loop
Resolution
After a little bit of googling, I found this issue on the WooCommerce Github project.
It’s closed, but not addressed. If you read the entire issue you can see it’s still occurring, I did comment on it too.
There is also a mention from MainWP in a commit of a code snippet that hooks into the function creating these transients. Here’s the code snippet.
add_action( 'setted_transient', 'mmx_wc_product_loop_transient', 50, 3 ); function mmx_wc_product_loop_transient( $transient, $value, $expiration ){ $pos = strpos( $transient, 'wc_product_loop_' ); if ( $pos !== false && $expiration == 2592000 ) { set_transient( $transient, $value, DAY_IN_SECONDS ); } }
I’ve also add the code to the Managing WP WordPress Code Snippets github repository.