Modifying custom post type created by WooCommerce

I think this hook fits your cause much better:

add_filter ('woocommerce_register_post_type_product', 'my_callback');
function my_callback ($args) {
     $args ['query_var'] = false;
     return $args;
}

not tested, but should work.

error code: 523