diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-05 17:31:52 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-05 17:31:52 +0200 |
commit | fb790ee9f625c72c817a871142c9db1a96b3f089 (patch) | |
tree | 1309e976a36ac364efbee5355ced20d3746ec4ab | |
parent | 13b442e970a26350ccefa71d9bb97ffc1487753d (diff) | |
download | woocommerce-taler-fb790ee9f625c72c817a871142c9db1a96b3f089.tar.gz woocommerce-taler-fb790ee9f625c72c817a871142c9db1a96b3f089.tar.bz2 woocommerce-taler-fb790ee9f625c72c817a871142c9db1a96b3f089.zip |
fix syntax
-rw-r--r-- | plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php b/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php index a755eef..205dfeb 100644 --- a/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php +++ b/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php @@ -221,15 +221,14 @@ function gnutaler_init_gateway_class() // OIDC button hook for WC!?) add_action('openid-connect-generic-redirect-user-back', - function( $redirect_url, $user ) { - // Take over the redirection complete. Send users somewhere special based on their capabilities. - global $woocommerce; - // FIXME: check if WC is actually running first? - $checkout_url = $woocommerce->cart->wc_get_checkout_url (); - wp_redirect( $checkout_url); // or admin_url( $checkout_url) )?; - exit(); - } - }, 10, 2); + function( $redirect_url, $user ) { + // Take over the redirection complete. Send users somewhere special based on their capabilities. + global $woocommerce; + // FIXME: check if WC is actually running first? + $checkout_url = $woocommerce->cart->wc_get_checkout_url (); + wp_redirect( $checkout_url); // or admin_url( $checkout_url) )?; + exit(); + }, 10, 2); $user = wp_get_current_user (); $token_response = $user->get('openid-connect-generic-last-token-response'); |