Create notice in custom gateway webhook
-
I am developing a custom payment gateway.
I am trying to add a notice in gateway’s webhook function like
public function webhook() {
if ( $_REQUEST[“status”] !== “success” ) {
wc_add_notice( __( ‘Payment failed.’, ‘gateway’ ), ‘error’ );
wp_safe_redirect( wc_get_checkout_url() );
}
}The code above redirects to checkout page but notice does not appear.
Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Create notice in custom gateway webhook’ is closed to new replies.