• Resolved allthingsa2z

    (@allthingsa2z)


    As others have noted (here) and (here) Woocommerce Square has created literally 1 million past due actions since installing on 2/11/24 – ‘wc_square_init_payment_token_migration’ action scheduler event. It’s running in a loop and adding hundreds of thousands of events to the queue, all with the same args

    Hook: wc_square_init_payment_token_migration

    Status: Pending

    Arguments: 'page' => 20

    Recurrance: Non-repeating

    Scheduled Date: async

    I rolled the update back to Version 4.4.1 but was still seeing the past due actions ticking up this morning so I completely deactivated the plug in which seems to have stopped it for now. But obviously, I would like to be able to use the Square payment processor…

    Thanks in advance for any help you can provide!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Until we get a permanent fix, you can trash all those bogus schedule actions in the SQL database by using this sql code in myphpadmin:
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘complete’
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘canceled’
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘failed

    You can also delete all the logs that were created. There are probably thousands of them.

    Hey there, @allthingsa2z! Thanks for contacting us and bringing this to our attention.

    And thank you @ninjapress2024, for sharing the workaround.

    @allthingsa2z, please let us know if you are not able to follow @ninjapress2024’s suggestion so we can help you find another one.

    Please let us know if you have any questions or need further help.

    Thank you for your patience and understanding while we investigate this. You can subscribe to the GitHub issue if you want to get updates on the progress.

    Have a wonderful day!

    Thread Starter allthingsa2z

    (@allthingsa2z)

    Thank you @ninjapress2024 – I tried using this but am getting errors:

    DELETE FROM “atoz_actionscheduler_actions” WHERE ‘status’ = ‘failed’;

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"atoz_actionscheduler_actions" WHERE 'status' = 'failed'' at line 1

    Any suggestions?

    • This reply was modified 9 months, 1 week ago by allthingsa2z.
    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @allthingsa2z,

    The error message is indicating that there’s a problem with the quotes you’re using.

    I checked the shared code and could notice a missing closing quote after ‘failed’. Please be sure to add the closing quote like in the code shared below:

    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘complete’
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘canceled’
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘failed’

    I hope this helps.

    hdaackda

    (@hdaackda)

    hi

    Plugin Support ckadenge (woo-hc) (@ckadenge)

    I also want to delete completed and even pending actions. will that harm my site?

    also in the below commands, it gives an error. Is it ok If I remove the quotes from the table name

    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘complete’
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘canceled’
    DELETE FROM ‘wp_actionscheduler_actions’ WHERE ‘status’ = ‘failed’

    (I can remove ‘ from wp_actionscheduler_actions and then it’ll work?)

    hdaackda

    (@hdaackda)

    also, HOW DO I DOWNGRADE the plugin while square sorts this out??

    Hey, @hdaackda!

    Regarding the code, please note that as per our support policy, we are not able to provide support for custom code. So I recommend checking the GitHub thread you shared as there’s a discussion about the code there that might help you.

    also, HOW DO I DOWNGRADE the plugin while square sorts this out??

    You can find older versions to download here.

    If you prefer, you can also use a plugin such as WP Rollback to help you with this process. You can find the plugin here.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[NSFW] “wc_square_init_payment_token_migration” endless loop of Past Due Actions’ is closed to new replies.