mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-30 11:42:22 +08:00
https://wordpress.org/support/topic/scheduled-action-fetch_patterns-runs-every-few-seconds/
8 lines
379 B
Text
8 lines
379 B
Text
add_action('init', function() {
|
|
if ( current_user_can('manage_woocommerce') ) {
|
|
update_option('woocommerce_blocks_did_fetch_patterns', true);
|
|
update_option('woocommerce_blocks_patterns_fetched', true);
|
|
update_option('woocommerce_blocks_show_pattern_banner', false);
|
|
update_option('woocommerce_admin_created_default_patterns', true);
|
|
}
|
|
});
|