editor->is_edit_mode(); if ( ( $is_edit_mode && ! wp_doing_ajax() ) || null === WC()->cart ) { $count = ''; } else { $count = WC()->cart->get_cart_contents_count(); } ?>