Skip to content

Commit

Permalink
VC-3461 fix error with second enqueue recaptcha script of wpforms plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegApanovich authored and orkunaybek committed Sep 5, 2024
1 parent b7466a0 commit 526ce9d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions visualcomposer/Modules/Vendors/Plugins/WpFormsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,9 @@ protected function initialize()
*/
public function disableReCaptcha($result)
{
global $post;
$is_recaptcha_scripts_enqueued = wp_script_is('wpforms-recaptcha');

if (! $post) {
return $result;
}

$postTypeHelper = vchelper('PostType');
$editor_post_type = $postTypeHelper->getEditorTypeByPostTypeDependecy($post->post_type);

if ($editor_post_type !== 'default') {
if ($is_recaptcha_scripts_enqueued) {
return true;
}

Expand Down

0 comments on commit 526ce9d

Please sign in to comment.