WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Function after payment complete (2 posts)

  1. ThomasBolander
    Member
    Posted 1 year 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() {
        wp_die("foo!");
    
    }

    Why doesn't it work ?

    Thanks !

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

  2. Roy
    Member
    Posted 1 year 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

About this Topic