• 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() {
        wp_die("foo!");
    
    }

    Why doesn’t it work ?

    Thanks !

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 1 replies (of 1 total)
  • Roy Ho

    (@splashingpixelscom)

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Function after payment complete’ is closed to new replies.