diff --git a/src/Gateway/PayplugGateway.php b/src/Gateway/PayplugGateway.php index 895aad35..d56f2327 100644 --- a/src/Gateway/PayplugGateway.php +++ b/src/Gateway/PayplugGateway.php @@ -185,7 +185,7 @@ public function __construct() self::$log_enabled = $this->debug; add_filter('woocommerce_get_order_item_totals', [$this, 'customize_gateway_title'], 10, 2); - add_action('the_post', [$this, 'validate_payment']); + add_action('woocommerce_checkout_order_processed', [$this, 'validate_payment']); add_action('woocommerce_available_payment_gateways', [$this, 'check_gateway']); }