我正在开发一个基于Wordpress WooCommerce的商店。
我可以在WooCommerce选项中选中/取消选中该选项。
是否可以使用php检测是否启用了ajax?
答案 0 :(得分:1)
你的意思是这个选项??
如果是,
$ajax_cart_en = 'yes' === get_option( 'woocommerce_enable_ajax_add_to_cart' );
if ($ajax_cart_en) { echo 'ajax is enabled'; }