{"id":1123,"date":"2019-11-27T11:24:58","date_gmt":"2019-11-27T18:24:58","guid":{"rendered":"https:\/\/help.foosales.com\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-submitting-an-order\/"},"modified":"2026-07-27T13:42:43","modified_gmt":"2026-07-27T19:42:43","slug":"por-que-aparece-un-error-de-red-al-enviar-un-pedido","status":"publish","type":"docs","link":"https:\/\/help.foosales.com\/es\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-submitting-an-order\/","title":{"rendered":"\u00bfPor qu\u00e9 aparece un error de red al enviar un pedido?"},"content":{"rendered":"<p>Si usted es <strong>capaz de conectarse<\/strong> a su tienda, sino recibir un <strong>error de red<\/strong> cuando <strong>enviar un pedido<\/strong>puede que haya una configuraci\u00f3n del servidor que impida que se env\u00ede la solicitud o puede que se haya producido alg\u00fan otro error en su back-end WordPress.<\/p>\n<p>Para comprobar si se ha producido un error de WordPress que haya provocado el fallo de la conexi\u00f3n, puede abrir el panel de administraci\u00f3n de WordPress y navegar hasta <strong>WooCommerce <\/strong>-&gt;<strong> Estado <\/strong>-&gt;<strong> Registros<\/strong> y consulte las \u00faltimas <strong>registro de errores fatales<\/strong> seleccion\u00e1ndolo en el men\u00fa desplegable. Aqu\u00ed deber\u00edas poder ver si hay alg\u00fan error relacionado con FooSales o posiblemente un conflicto con otro plugin. Si no hay errores o nada que parezca relacionado con FooSales, entonces podr\u00eda haber una configuraci\u00f3n del servidor que impida el env\u00edo de la solicitud.<\/p>\n<p>If you are not using web app that is bundled with the FooSales plugin on your own site and are using the hosted web app at <em>https:\/\/web.foosales.com<\/em>, FooSales will to your store from a domain that is different from your domain. Requests between different domains are known as <strong>peticiones de compartici\u00f3n de recursos entre or\u00edgenes (CORS)<\/strong>. Su servidor deber\u00e1 permitir espec\u00edficamente este tipo de peticiones. Normalmente los servidores ya est\u00e1n configurados para aceptar estas peticiones y devolver la respuesta con las cabeceras apropiadas, pero algunos servidores pueden estar configurados para bloquearlas. Su navegador <strong>impedir la solicitud<\/strong> de completarse si la respuesta no tiene el valor <strong>encabezados obligatorios<\/strong>.<\/p>\n<p>Su servidor debe devolver un <strong>Cabecera Access-Control-Allow-Origin<\/strong> que permite a FooSales publicar datos en tu tienda. Puede intentar a\u00f1adir el siguiente c\u00f3digo al tema WordPress de <strong>funciones.php<\/strong> para ver si cambia algo:<\/p>\n<pre>function add_foosales_cors_http_header(){\r\n    header(\"Access-Control-Allow-Origin: https:\/\/web.foosales.com\");\r\n}\r\nadd_action('init','add_foosales_cors_http_header');<\/pre>\n<p>Puede probar a utilizar\u00a0<strong>https:\/\/web.foosales.com<\/strong> o simplemente <strong>*<\/strong> (un asterisco que permite cualquier origen) como valor de origen.<\/p>\n<p>Si el c\u00f3digo anterior no funciona, deber\u00eda poder ver si este encabezado est\u00e1 habilitado o no y cu\u00e1l es su valor si tiene acceso a la configuraci\u00f3n de su servidor. Tambi\u00e9n puede ponerse en contacto con su <strong>administrador del servidor<\/strong> o <strong>alojamiento web<\/strong> preguntar sobre permitir <strong>solicitudes de API REST entre dominios<\/strong> para FooSales. Algunos navegadores tambi\u00e9n tienen ajustes que puedes modificar para permitir estas solicitudes para FooSales. Alternativamente, puede utilizar un <strong>servidor proxy<\/strong> que garantiza que todas las cabeceras correctas se establecen y se devuelven entre su sitio web y FooSales.<\/p>\n<p>We recommend using the web app that is bundled with the plugin by launching the POS directly from your WordPress admin dashboard. Authentication is handled automatically and and server requests will be made from the same domain, therefore eliminating any CORS issues.<\/p>","protected":false},"featured_media":0,"parent":485,"menu_order":5,"comment_status":"open","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_is_vendor_doc":"0","footnotes":""},"doc_tag":[98,101,102,103,104,105,106,107,108,109,110,21,16],"class_list":["post-1123","docs","type-docs","status-publish","hentry","doc_tag-api","doc_tag-blocked","doc_tag-cors","doc_tag-cross-origin","doc_tag-headers","doc_tag-network-error","doc_tag-permission","doc_tag-post","doc_tag-proxy","doc_tag-request","doc_tag-rest","doc_tag-rest-api","doc_tag-web-app"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs\/1123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/comments?post=1123"}],"version-history":[{"count":2,"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs\/1123\/revisions"}],"predecessor-version":[{"id":56510,"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs\/1123\/revisions\/56510"}],"up":[{"embeddable":true,"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs\/485"}],"next":[{"title":"\u00bfPor qu\u00e9 se bloquea la aplicaci\u00f3n?","link":"https:\/\/help.foosales.com\/es\/docs\/frequently-asked-questions\/errors\/why-does-the-app-crash\/","href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs\/54724"}],"prev":[{"title":"\u00bfPor qu\u00e9 aparece un error de red al intentar conectarme a mi tienda?","link":"https:\/\/help.foosales.com\/es\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-trying-to-connect-to-my-store\/","href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/docs\/54395"}],"wp:attachment":[{"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/media?parent=1123"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.foosales.com\/es\/wp-json\/wp\/v2\/doc_tag?post=1123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}