Add a new view on the Woocommerce account page

 add_action('woocommerce_account_wishlist_endpoint', function() {
    $wishlists = [];

    wc_get_template('myaccount/my-wishlist.php', [
        'wishlists' => $wishlists
    ]);
});

error code: 523