douzui0143 2019-02-11 19:33
浏览 45

WooCommerce:结帐到期不起作用

I've a website with WooCommerce installed. On my website I'm using CRED to allow my users to create products in my Shop (so they need to pay for this via the WooCommerce checkout).

When I fill out the CRED Toolset form now and press "Pay to create product", I'm getting redirected directly to the WooCommerce checkout.

When I close the page now (without continuing the payment) and come back 2 days later, the checkout is still there with the "product" in it. Because I don't want this, I've added this function here to clean the checkout after 2 hours but I've tried it and it don't works (the checkout is still available after days):

/**
 * Checkout and cart expiring
 */
add_filter( 'wc_session_expiring', 'wc_session_expiring' );
function wc_session_expiring( $seconds ) {
    return 60 * 60 * 1;
}

/**
 * Checkout and cart expired
 */
add_filter( 'wc_session_expiration', 'wc_session_expired' );
function wc_session_expired( $seconds ) {
    return 60 * 60 * 2;
}

So what can I do to clean the checkout after 2 hours waiting for the user to press the "Pay now" button?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 winform的chart曲线生成时有凸起
    • ¥15 msix packaging tool打包问题
    • ¥15 finalshell节点的搭建代码和那个端口代码教程
    • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
    • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
    • ¥15 Centos / PETSc / PETGEM
    • ¥15 centos7.9 IPv6端口telnet和端口监控问题
    • ¥120 计算机网络的新校区组网设计
    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录