Last active
August 5, 2019 17:33
-
-
Save jessepearson/ccfa3c952f83e1699768a2daab95486b to your computer and use it in GitHub Desktop.
Turn off the block (Gutenberg) editor for the product post type in WooCommerce
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 // do not copy this line | |
| function jp_dectivate_gutenberg_for_products( $can_edit, $post_type ){ | |
| if( 'product' === $post_type ){ | |
| $can_edit = ''; | |
| } | |
| return $can_edit; | |
| } | |
| add_filter( 'use_block_editor_for_post_type', 'jp_dectivate_gutenberg_for_products', 999, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment