Last active
April 15, 2022 12:49
-
-
Save WProbot/8b216207de8ba027419ee32f12a06028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'setted_transient', 'fix_wc_product_loop_transient', 50, 3 ); | |
| function fix_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 ); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment