Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace woocommerce editor by classic post editor?

I want to replace the woocommerce editor by classic editor ( as post ).

I tried to install some editor plugin such as TinyMCE but it still not work as I want. Thanks for your help!

like image 941
Andy Thomas Avatar asked Dec 20 '25 03:12

Andy Thomas


2 Answers

You can disable block editor for any post type with use_block_editor_for_post_type filter hook.

add_filter ('use_block_editor_for_post_type', 'so57234401_use_block_editor', 10, 2 );
function so57234401_use_block_editor( $use_block_editor, $post_type )
{

    if ( 'product' != $post_type )
        return $use_block_editor;

    return false;
}
like image 198
nmr Avatar answered Dec 21 '25 23:12

nmr


I use Classic Editor for all my projects. It works for posts, pages, custom post types and products. Also works well with must plugins.

It's a pain to have to install it on every installation but it is the best solution I have found to overwriting Gutenberg.

nmr answer is brilliant! In fact it is the most simplistic solution I have seen in a long time. I just tested it and it works like a charm.

like image 34
Shado Avatar answered Dec 21 '25 23:12

Shado



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!