{"id":131953,"date":"2022-09-04T11:38:00","date_gmt":"2022-09-04T06:08:00","guid":{"rendered":"https:\/\/git-staging.wpastra.com\/?post_type=docs&#038;p=131953"},"modified":"2022-09-25T01:50:25","modified_gmt":"2022-09-24T20:20:25","slug":"how-to-disable-cart-fragments-on-woocommerce","status":"publish","type":"docs","link":"https:\/\/git-staging.wpastra.com\/es\/docs\/how-to-disable-cart-fragments-on-woocommerce\/","title":{"rendered":"\u00bfC\u00f3mo desactivar los fragmentos de carrito en WooCommerce?"},"content":{"rendered":"<p>Los fragmentos de carrito de Woocommerce son las peticiones Ajax que se encargan de manejar la opci\u00f3n de carrito en la cabecera. Por ejemplo, cuando los usuarios de su sitio web a\u00f1aden un producto al carrito y posteriormente hacen clic en la opci\u00f3n carrito de la cabecera, esta petici\u00f3n muestra los art\u00edculos disponibles en el carrito. Por ejemplo, este script permite que tu carrito muestre su contenido cuando el usuario pasa el rat\u00f3n por encima en la cabecera.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"600\" height=\"238\" src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/what-does-cart-frigments-do.gif\" alt=\"\" class=\"wp-image-131954\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u00bfPor qu\u00e9 tengo que desactivar esta solicitud?<\/h3>\n\n\n\n<p>Estas solicitudes est\u00e1n habilitadas por defecto en la nueva instalaci\u00f3n del plugin WooCommerce y parece una gran caracter\u00edstica a tener. El \u00fanico inconveniente de esta caracter\u00edstica es que si usted est\u00e1 en un proveedor de alojamiento lento, podr\u00eda tomar hasta 3-5 minutos para cargar y por lo tanto reduce la velocidad de carga general de todo su sitio web. Le recomendamos que desactive esta funci\u00f3n si usted est\u00e1 en un proveedor de alojamiento lento.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u00bfC\u00f3mo desactivar los fragmentos de carro?<\/h3>\n\n\n\n<p>Puede utilizar los siguientes pasos para desactivar el script de fragmentos de carro en su sitio web WooCommerce:<\/p>\n\n\n\n<p><strong>Paso 1:<\/strong> Vaya a la configuraci\u00f3n de WooCommerce y haga clic en productos<\/p>\n\n\n\n<p><strong>Segundo paso:<\/strong> desmarque la casilla que dice \"Habilitar Ajax a\u00f1adir a la cesta bot\u00f3n de archivo\"<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button.png\"><img decoding=\"async\" width=\"1024\" height=\"441\" src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1024x441.png\" alt=\"Accessing cart fragment\" class=\"wp-image-131955\" srcset=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1024x441.png 1024w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-300x129.png 300w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-768x330.png 768w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button.png 1334w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p><strong>Paso 3:<\/strong> Marque la casilla que dice \"Redirigir a la p\u00e1gina del carrito despu\u00e9s de la adici\u00f3n con \u00e9xito\"<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1.png\"><img decoding=\"async\" width=\"1024\" height=\"441\" src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1-1024x441.png\" alt=\"accessing product\" class=\"wp-image-131956\" srcset=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1-1024x441.png 1024w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1-300x129.png 300w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1-768x330.png 768w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-woocommerce-disable-ajax-add-to-cart-button-1.png 1334w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Estas opciones son t\u00e9cnicamente opcionales, pero esto asegurar\u00e1 que se evite cualquier plugin de cach\u00e9 que tenga instalado en su sitio web.<\/p>\n\n\n\n<p><strong>Paso 4: <\/strong>con el fin de dequeue el JavaScript puede que tenga que a\u00f1adir el siguiente fragmento en el archivo functions.php de su tema hijo. Si no est\u00e1 seguro de lo que es un tema hijo, aqu\u00ed es un <a href=\"https:\/\/git-staging.wpastra.com\/es\/docs\/install-astra-child-theme\/\">art\u00edculo <\/a>que le guiar\u00e1. Por favor, navegue hasta el editor de archivos de apariencia y tema y haga clic en el archivo function.php del tema hijo.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"435\" src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-2-1024x435.png\" alt=\"Ast-child-theme\" class=\"wp-image-133727\" srcset=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-2-1024x435.png 1024w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-2-300x127.png 300w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-2-768x326.png 768w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-2.png 1303w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Copie el siguiente fragmento y p\u00e9guelo en la parte inferior del archivo function.php. No olvide guardar el archivo.<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\" data-no-auto-translation=\"\"><code>\/** Disable Ajax Call from WooCommerce *\/\nfunction sert_dequeue_woocommerce_cart_fragments() { \n\twp_dequeue_script('wc-cart-fragments'); \n}\n\nadd_action( 'wp_enqueue_scripts', 'sert_dequeue_woocommerce_cart_fragments', PHP_INT_MAX); <\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-adding-code-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"393\" src=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-adding-code-2-1024x393.png\" alt=\"adding code\" class=\"wp-image-133731\" srcset=\"https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-adding-code-2-1024x393.png 1024w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-adding-code-2-300x115.png 300w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-adding-code-2-768x294.png 768w, https:\/\/git-staging.wpastra.com\/wp-content\/uploads\/2022\/09\/ast-child-theme-adding-code-2.png 1307w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>El fragmento de c\u00f3digo mencionado anteriormente s\u00f3lo dequeues todo el archivo JavaScript y desactiva los fragmentos de carro WooCommerce para asegurar que su sitio se ejecuta m\u00e1s r\u00e1pido, incluso en los proveedores de alojamiento lento.<\/p>","protected":false},"excerpt":{"rendered":"<p>Los fragmentos de carrito de Woocommerce son las peticiones Ajax que se encargan de manejar la opci\u00f3n de carrito en la cabecera. Por ejemplo, cuando los usuarios de su sitio web a\u00f1aden un producto al carrito y posteriormente hacen clic en la opci\u00f3n carrito de la cabecera, esta petici\u00f3n muestra los art\u00edculos disponibles en el carrito. Por ejemplo, este script [...]<\/p>","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","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":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","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":""}},"footnotes":""},"docs_category":[148],"docs_tag":[],"class_list":{"0":"post-131953","1":"docs","2":"type-docs","3":"status-publish","5":"docs_category-woo"},"spectra_custom_meta":{"wp_last_modified_info":["September 25, 2022 @ 1:50 AM"],"wplmi_shortcode":["[lmt-post-modified-info]"],"_edit_lock":["1684848012:89"],"_wplmi_last_modified":["2022-09-25 01:50:25"],"rank_math_internal_links_processed":["1"],"rank_math_primary_docs_category":["148"],"rank_math_seo_score":["20"],"_edit_last":["86"],"tap_disable_autolinker":["no"],"tap_autolink_inside_heading":["global"],"tap_autolink_random_placement":["global"],"tap_post_autolinker_limit":["0"],"rank_math_analytic_object_id":["1909"],"views":["10017"],"helpful":["7"],"unhelpful":["9"],"redirects":["5"],"pfd_related_docs":[""],"rank_math_og_content_image":["a:2:{s:5:\"check\";s:32:\"b65fd7f8b7e7acbf603becf977ceb113\";s:6:\"images\";a:1:{i:0;i:131954;}}"],"_trp_automatically_translated_slug_es_ES":["como-desactivar-los-fragmentos-de-carrito-en-woocommerce"]},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false},"uagb_author_info":{"display_name":"Arindam","author_link":"https:\/\/git-staging.wpastra.com\/es\/author\/arindamm\/"},"uagb_comment_info":0,"uagb_excerpt":"Woocommerce cart fragments are the Ajax requests that are responsible for handling the cart option on the header. For example, when the users on your website add a product in the cart and later click on the cart option on the header, this request shows the items available on the cart. For instance, this script&hellip;","_links":{"self":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/131953"}],"collection":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/comments?post=131953"}],"version-history":[{"count":0,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs\/131953\/revisions"}],"wp:attachment":[{"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/media?parent=131953"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_category?post=131953"},{"taxonomy":"docs_tag","embeddable":true,"href":"https:\/\/git-staging.wpastra.com\/es\/wp-json\/wp\/v2\/docs_tag?post=131953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}