I am building a payment Gateway for WooCommerce where the payment takes place in an offsite URL. I need that page to be able to message back to the WooCommerce plugin, and a "callback" URL is really all I need.
WooCommerce seems to have this, but I can't get it to work. You're supposed to be able to ping:
http://yoursite/wc-api/WC_your_gateway
And then you're supposed to add add_action( 'woocommerce_api_callback', 'callback_handler' ); And then it's supposed to fire a function like this public function callback_handler() {}
But when I go to that URL, all I see is a 1 on my page - my handler should be redirecting to another page (that's what I set it to do to make it obvious). What I'd LOVE is if anyone has an example of this working. I've tried placing the add_action and the handler function lots of places, no luck.