1
我对woocommerce相当新,虽然有一天添加到购物车和购物车页面显示正常。我现在发现进入我的购物车页面会产生一个空白页面。Woocommerce,添加到购物车不工作,购物车页面不显示
有谁知道什么会导致此类问题?
感谢,
我对woocommerce相当新,虽然有一天添加到购物车和购物车页面显示正常。我现在发现进入我的购物车页面会产生一个空白页面。Woocommerce,添加到购物车不工作,购物车页面不显示
有谁知道什么会导致此类问题?
感谢,
如何在购物车页面的网址? 你是否在wordpress中设置永久链接?
设置>永久设置>帖子名称
它的自动显示/%postname%/
这段代码添加到您的function.php:
add_filter('auth_cookie_expiration', 'my_expiration_filter', 99, 3);
function my_expiration_filter($seconds, $user_id, $remember){
//if "remember me" is checked;
if ($remember) {
//WP defaults to 2 weeks;
$expiration = 14*24*60*60; //UPDATE HERE;
} else {
//WP defaults to 48 hrs/2 days;
$expiration = 2*24*60*60; //UPDATE HERE;
}
//http://en.wikipedia.org/wiki/Year_2038_problem
if (PHP_INT_MAX - time() < $expiration) {
//Fix to a little bit earlier!
$expiration = PHP_INT_MAX - time() - 5;
}
return $expiration;
}
添加此代码到你的function.php –
请格式化你的代码并添加评论回答 – user7294900
add_filter('auth_cookie_expiration','my_expiration_filter',99,3);如果($记住){ $ expiration = 14 * 24 * 60 * 60; //在这里更新; } else { $ expiration = 2 * 24 * 60 * 60; //在这里更新; (PHP_INT_MAX_time()<$ expiration){expiration = PHP_INT_MAX_time() - 5;}} } return $ expiration; } –