• Resolved altmayank

    (@altmayank)


    I have setup everything according to the github documentation. I want to cancel all orders with status wc-pending after 2 hours. However, it is not working, the orders stay in wc-pending status and don’t change to cancelled.

    Please take a look at my code on the screenshot. I use the Code Snippets plugin to write custom functions. Let me know if I am doing anything wrong.

    FUNCTIONS —

    View post on imgur.com

    PAYMENT GATEWAY SETTINGS —

    View post on imgur.com

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author RVOLA

    (@rvola)

    Hi @altmayank
    Your configuration is impeccable!
    The canceled order works once per hour.
    You can check the time of the passage in WooCommerce> Etart> Planned actions and search: woo_cao
    https://domain.com/wp-admin/admin.php?page=wc-status&tab=action-scheduler&status=pending&s=woo_cao

    The plugin goes with each triggering of the cron carried out the following methodology:
    Look for orders of the status you requested that are older than the time limit you have granted.

    In summary if the cron goes at 8:30 am> 9:30 am> 10:30 am> 11:30 am etc …
    and that the order took place at 8.45 a.m., it will be canceled in the 11.30 a.m. cron (8.45 a.m. + 2 a.m. = 10.45 a.m.)

    I currently have too much work to modify the code to refactor the code for precise cancellation per order.
    It is planned but priority to paid work for the moment;)

    Thread Starter altmayank

    (@altmayank)

    Hi, I understand the methodology. However, I still have pending orders from 24 hours ago that are not cancelled. Is there anyway I can run it manually to check what’s the issue?

    Plugin Author RVOLA

    (@rvola)

    yes just click on “run” in the planned actions.
    If you have access to phpMyAdmin run this command

    SELECT posts.ID
    wp_posts as posts
    INNER JOIN wp_postmeta as meta
    ON posts.ID = meta.post_id
    WHERE posts.post_type = 'shop_order'
    AND posts.post_status IN ('wc-pending','wc-failed')
    AND posts.post_date < '2021-02-04 08:00:00'
    AND meta.meta_key = '_payment_method'
    AND meta.meta_value IN ('cashfree','paypal','payumbolt')

    remember to replace wp_ in the request according to your configuration
    try to verify that the value of the postmeta is indeed ‘cashfree’ or ‘paypal’ or ‘payumbolt’

    Thread Starter altmayank

    (@altmayank)

    I tried clicking ‘run’ in the planned actions section. It is still not working, the orders still remain as pending status ??

    And the postmeta is cashfree, paypal or payumbolt. That’s the reason the plugin options are visible on payment settings page of these payment gateways.

    Plugin Author RVOLA

    (@rvola)

    Can you provide me with connection information so that I can access your website: https://onetimesecret.com/

    Thread Starter altmayank

    (@altmayank)

    Does it have to be admin user details? There are a lot of sensitive information about the orders and customers which I can’t disclose.

    Plugin Author RVOLA

    (@rvola)

    Sorry but as it is I can’t help you anymore.
    The plugin is functional and it is free.
    Trying to look in the code and debug the steps to understand the command is not undone.

    The code is reliable and it must have something which explains why this one does not cancel the order.

    Plugin Author RVOLA

    (@rvola)

    Did you manage to understand why your order is not canceled?

    I realize without blaming you personally that most of the open support threads I never get a “thank you for your free help”. After we are surprised that the plugins become paying, but it would take a minimum thank the volunteer staff.

    Thread Starter altmayank

    (@altmayank)

    Sorry man, I forgot to reply here. I saw the notification on my email just a few minutes ago. There was a plugin conflict and now the issue has been fixed. Thank you for this plugin and thank you for your help.

    Plugin Author RVOLA

    (@rvola)

    ok i am glad you found the culprit and thanks for your feedback.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Plugin not working’ is closed to new replies.