Changeset 3437431
- Timestamp:
- 01/12/2026 07:41:22 AM (3 months ago)
- Location:
- bucksbus/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
bucksbus.php (modified) (3 diffs)
-
includes/class-wc-gateway-bucksbus-handler.php (modified) (2 diffs)
-
includes/class-wc-gateway-bucksbus-provider-base.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bucksbus/trunk/README.txt
r3428871 r3437431 5 5 Requires at least: 6.0 6 6 Tested up to: 6.9 7 Stable tag: 1.2. 37 Stable tag: 1.2.4 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 83 83 == Changelog == 84 84 85 = 1.2.4 = 86 * Bug fixes 87 85 88 = 1.2.3 = 86 89 * Bug fixes -
bucksbus/trunk/bucksbus.php
r3428867 r3437431 4 4 * Plugin Name: BucksBus 5 5 * Description: Adds BucksBus to your WooCommerce website. 6 * Version: 1.2. 36 * Version: 1.2.4 7 7 * 8 8 * Author: BucksBus … … 12 12 * Domain Path: /languages 13 13 * 14 * Copyright: © 202 5BucksBus.14 * Copyright: © 2026 BucksBus. 15 15 * License: GPL v2 or later 16 16 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 'name' => 'Banxa', 35 35 'code' => 'cbanxa' 36 ),37 array(38 'name' => 'Guardarian',39 'code' => 'guardarian'40 36 ), 41 37 array( -
bucksbus/trunk/includes/class-wc-gateway-bucksbus-handler.php
r3298100 r3437431 43 43 // Actions. 44 44 add_action('woocommerce_api_wc_gateway_bucksbus', array($this, 'handle_webhook')); 45 add_action('template_redirect', array($this, 'handle_no_referrer_redirect')); 45 46 } 46 47 … … 96 97 wp_die('Invalid webhook', 'BucksBus Webhook', array('response' => 401)); 97 98 } 99 100 101 public function handle_no_referrer_redirect() { 102 103 if ( empty( $_GET['wc-noref'] ) || empty( $_GET['to'] ) ) { 104 return; 105 } 106 107 $target = esc_url_raw( urldecode( $_GET['to'] ) ); 108 109 if ( ! $target ) { 110 wp_die( 'Invalid redirect' ); 111 } 112 113 header( 'Referrer-Policy: no-referrer' ); 114 header( 'Content-Type: text/html; charset=utf-8' ); 115 116 printf( 117 '<!doctype html> 118 <html> 119 <head> 120 <meta charset="utf-8"> 121 <title>Redirecting…</title> 122 </head> 123 <body> 124 <script> 125 window.location.replace(%s); 126 </script> 127 <noscript> 128 <meta http-equiv="refresh" content="0;url=%s"> 129 </noscript> 130 </body> 131 </html>', 132 wp_json_encode( $target ), 133 esc_attr( $target ) 134 ); 135 136 exit; 137 } 138 98 139 } 99 140 -
bucksbus/trunk/includes/class-wc-gateway-bucksbus-provider-base.php
r3298100 r3437431 297 297 $order->save(); 298 298 299 300 return array( 301 'result' => 'success', 302 'redirect' => $payment['fiat_payment_url'], 303 ); 299 return [ 300 'result' => 'success', 301 'redirect' => add_query_arg( 302 [ 303 'wc-noref' => 1, 304 'to' => rawurlencode( $payment['fiat_payment_url'] ), 305 ], 306 home_url( '/' ) 307 ), 308 ]; 304 309 } 305 310
Note: See TracChangeset
for help on using the changeset viewer.