• Resolved Strawberry

    (@cheesecake4488)


    I switched woocommerce single classic product editor to Guthenburg editor using the following snippet. Thank you very much is someone could help. There is nothing wrong when

    / enable gutenberg for woocommerce
    function activate_gutenberg_product( $can_edit, $post_type ) {
    if ( $post_type == 'product' ) {
    $can_edit = true;
    }
    return $can_edit;
    }
    add_filter( 'use_block_editor_for_post_type', 'activate_gutenberg_product', 10, 2 );
    // enable taxonomy fields for woocommerce with gutenberg on
    function enable_taxonomy_rest( $args ) {
    $args['show_in_rest'] = true;
    return $args;
    }
    add_filter( 'woocommerce_taxonomy_args_product_cat', 'enable_taxonomy_rest' );
    add_filter( 'woocommerce_taxonomy_args_product_tag', 'enable_taxonomy_rest' );

    Error Details
    =============
    An error of type E_ERROR was caused in line 10 of the file eval()’d code.

    Error message: Uncaught Error: Call to a member function get_price() on bool in  : eval()’d code:10

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘eval()’d code error’ is closed to new replies.