Skip to content

Commit 335ebec

Browse files
committed
Respect dependency of cf7 scripts on main hcaptcha script.
1 parent 7f56c68 commit 335ebec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/php/CF7/Admin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace HCaptcha\CF7;
1212

1313
use HCaptcha\Helpers\Pages;
14+
use HCaptcha\Main;
1415
use WPCF7_ContactForm;
1516
use WPCF7_TagGenerator;
1617
use WPCF7_TagGeneratorGenerator;
@@ -307,7 +308,7 @@ public function enqueue_admin_scripts_before_cf7(): void {
307308
wp_enqueue_script(
308309
self::HANDLE,
309310
HCAPTCHA_URL . "/assets/js/hcaptcha-cf7$min.js",
310-
[],
311+
[ Main::HANDLE ],
311312
HCAPTCHA_VERSION,
312313
true
313314
);

src/php/CF7/CF7.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
use HCaptcha\Helpers\API;
1414
use HCaptcha\Helpers\HCaptcha;
15+
use HCaptcha\Main;
1516
use WPCF7_FormTag;
1617
use WPCF7_Submission;
1718
use WPCF7_Validation;
@@ -309,7 +310,7 @@ public function enqueue_scripts(): void {
309310
wp_enqueue_script(
310311
self::HANDLE,
311312
HCAPTCHA_URL . "/assets/js/hcaptcha-cf7$min.js",
312-
[],
313+
[ Main::HANDLE ],
313314
HCAPTCHA_VERSION,
314315
true
315316
);

0 commit comments

Comments
 (0)