summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php8
-rwxr-xr-xserver-build/QEMU-autobuild/buildReclaim.sh1
-rw-r--r--snippets/oidc-reclaim.php13
3 files changed, 9 insertions, 13 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 3c78d21..bbfb7e6 100644
--- a/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php
+++ b/plugin/GNU-Taler-Payment-Gateway/class-wc-gnutaler-gateway.php
@@ -221,8 +221,16 @@ function gnutaler_init_gateway_class()
20,
4 );
+ add_filter ( 'openid-connect-generic-cookie-redirect-url',
+ array ($this, 'filter_redir_cb') );
+
}
+ function filter_redir_cb ( $var ) {
+ $this->info( 'REDIR input is ' . $var );
+ return $var;
+ }
+
/**
* Called when WC sends out the e-mail notification for refunds.
* Adds a Taler-specific notice for where to click to obtain
diff --git a/server-build/QEMU-autobuild/buildReclaim.sh b/server-build/QEMU-autobuild/buildReclaim.sh
index 82a879f..d54e56d 100755
--- a/server-build/QEMU-autobuild/buildReclaim.sh
+++ b/server-build/QEMU-autobuild/buildReclaim.sh
@@ -54,3 +54,4 @@ sudo -u www-data wp --user=admin option patch update openid_connect_generic_sett
sudo -u www-data wp --user=admin option patch update openid_connect_generic_settings displayname_format "{given_name} {full_name}"
sudo -u www-data wp --user=admin option patch update openid_connect_generic_settings identify_with_username "1"
sudo -u www-data wp --user=admin option patch update openid_connect_generic_settings enable_logging "1"
+sudo -u www-data wp --user=admin option patch update openid_connect_generic_settings redirect_user_back "1"
diff --git a/snippets/oidc-reclaim.php b/snippets/oidc-reclaim.php
index cbb2f8c..93c14f5 100644
--- a/snippets/oidc-reclaim.php
+++ b/snippets/oidc-reclaim.php
@@ -8,16 +8,3 @@ add_filter('openid-connect-generic-login-button-text', function( $text ) {
$text = __('Login with Re:ClaimID', 'gnutaler' );
return $text;
});
-
-// make sure OIDC 'login' goes to WooCommerce checkout URL.
-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;
- $checkout_url = $woocommerce->cart->wc_get_checkout_url ();
- wp_redirect( $checkout_url); // or admin_url( $checkout_url) )?;
- exit();
- },
- 10,
- 2);