设置Woocommerce woocommerce_get_refreshed_fragments调用admin-ajax.php在页面加载后运行

时间:2015-01-11 12:21:03

标签: ajax wordpress woocommerce pageload admin-ajax

我用cahce优化了我的网站,它的加载时间大约为2秒。 问题是,即使所有内容都已完成加载,但是有一个ajax调用admin-ajax.php,其中一个名为woocommerce_get_refreshed_fragments的操作会在另外3-4秒内减慢负载。 是否有办法设置在页面加载完成后运行此操作? 像

这样的东西
add_action("print_woocommerce_get_refreshed_fragments_script","after_load" ) 

(仅举例)。或任何其他想法来解决这个问题,并在页面加载完成后调用admin-ajax.php。 谢谢。 此功能显示在https://github.com/jpBenfica/woocommercePT/blob/master/woocommerce-ajax.php

0 个答案:

没有答案
相关问题