Function after payment complete (2 posts)

  1. ThomasBolander
    Posted 3 years ago #

    I'm trying to add a function (hook) after payment is completed in WordPress where i use the plugin woocomerce.

    I want to add the order to my billing system.

    The documentation for woocommere says that there is an action called "woocommerce_payment_complete" and a filter called "woocommerce_payment_complete_order_status"

    Nothing is happend, when i try to use them

    add_action('woocommerce_payment_complete', 'do_something_foo');
    function do_something_foo() {

    Why doesn't it work ?

    Thanks !


  2. Roy Ho
    Posted 3 years ago #

    The easiest way to debug this is to dig into the code I am afraid. Find the hook you're using and hook to one before the complete status and see if you get any feedback there. This will get you closer to finding out why the one you're using doesn't work. Sorry I don't have anything to show you but just my advice.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic