ch.use( wp.apiFetch.nonceMiddleware ); wp.apiFetch.use( wp.apiFetch.mediaUploadMiddleware ); wp.apiFetch.nonceEndpoint = "https://rachmaninov-russia.ru/wp-admin/admin-ajax.php?action=rest-nonce";