Skip to content

Commit 668957b

Browse files
authored
V3.7.1 (#309)
* Fix agrs for Enterprise api.js. * Update readme.txt. * Bump up version. * Bump up version.
1 parent c3fe478 commit 668957b

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

hcaptcha.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Plugin Name: hCaptcha for WordPress
1111
* Plugin URI: https://www.hcaptcha.com/
1212
* Description: hCaptcha keeps out bots and spam while putting privacy first. It is a drop-in replacement for reCAPTCHA.
13-
* Version: 3.7.0
13+
* Version: 3.7.1
1414
* Requires at least: 5.0
1515
* Requires PHP: 7.0
1616
* Author: hCaptcha
@@ -21,7 +21,7 @@
2121
* Domain Path: /languages/
2222
*
2323
* WC requires at least: 3.0
24-
* WC tested up to: 8.4
24+
* WC tested up to: 8.5
2525
*/
2626

2727
// phpcs:ignore Generic.Commenting.DocComment.MissingShort
@@ -39,7 +39,7 @@
3939
/**
4040
* Plugin version.
4141
*/
42-
const HCAPTCHA_VERSION = '3.7.0';
42+
const HCAPTCHA_VERSION = '3.7.1';
4343

4444
/**
4545
* Path to the plugin dir.

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: captcha, hcaptcha, recaptcha, spam, abuse
44
Requires at least: 5.0
55
Tested up to: 6.4
66
Requires PHP: 7.0.0
7-
Stable tag: 3.7.0
7+
Stable tag: 3.7.1
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -540,6 +540,9 @@ Instructions for popular native integrations are below:
540540

541541
== Changelog ==
542542

543+
= 3.7.1 =
544+
* Fixed adding arguments to api.js for Enterprise accounts.
545+
543546
= 3.7.0 =
544547
* Tested with WooCommerce 8.5.
545548
* Added optional Enterprise settings.

src/php/Main.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -419,19 +419,19 @@ public function get_api_src(): string {
419419
$api_host = trim( $this->settings()->get( 'api_host' ) ) ?: self::API_HOST;
420420

421421
$enterprise_params = [
422-
'asset_host',
423-
'endpoint',
424-
'host',
425-
'image_host',
426-
'report_api',
427-
'sentry',
422+
'asset_host' => 'assethost',
423+
'endpoint' => 'endpoint',
424+
'host' => 'host',
425+
'image_host' => 'imghost',
426+
'report_api' => 'reportapi',
427+
'sentry' => 'sentry',
428428
];
429429

430-
foreach ( $enterprise_params as $enterprise_param ) {
430+
foreach ( $enterprise_params as $enterprise_param => $enterprise_arg ) {
431431
$value = trim( $this->settings()->get( $enterprise_param ) );
432432

433433
if ( $value ) {
434-
$params[ $enterprise_param ] = rawurlencode( $value );
434+
$params[ $enterprise_arg ] = rawurlencode( $value );
435435
}
436436
}
437437

0 commit comments

Comments
 (0)