Created
June 23, 2025 16:48
-
-
Save jmabbas/44aa3fcc611c2c0dc5f97c820b400bfd to your computer and use it in GitHub Desktop.
WooCommerce enable product Gutenberg editor
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
add_filter('use_block_editor_for_post_type', 'enable_gutenberg_for_products', 10, 2); | |
function enable_gutenberg_for_products($use_block_editor, $post_type) { | |
if ($post_type === 'product') { | |
return true; | |
} | |
return $use_block_editor; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment