We are using woocommerce_thankyou to execute an action on checkout. However, in a simple test, if I set the action and just "echo 'Test';" it happens 4 times. This is the code
class OrderController
{
public function __construct()
{
add_action('woocommerce_thankyou', array($this, 'orderSubmit'));
}
function orderSubmit()
{
global $woocommerce;
echo "test"; // happens 4 times
}
}