Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/addons-for-elementor-builder/addons-for-elementor-builder.php
+++ b/addons-for-elementor-builder/addons-for-elementor-builder.php
@@ -3,7 +3,7 @@
* Plugin Name: Vertex Addons for Elementor
* Plugin URI: https://vertexaddons.com/
* Description: Just one plugin instead of a lot!
- * Version: 1.6.4
+ * Version: 1.7.0
* Author: Webilia
* Author URI: https://webilia.com/
* License: GPL v2 or later
--- a/addons-for-elementor-builder/afeb.php
+++ b/addons-for-elementor-builder/afeb.php
@@ -22,7 +22,7 @@
*
* @var string
*/
- public $version = '1.6.4';
+ public $version = '1.7.0';
/**
* The single instance of the class
--- a/addons-for-elementor-builder/app/Ajax.php
+++ b/addons-for-elementor-builder/app/Ajax.php
@@ -224,10 +224,14 @@
{
check_ajax_referer('afeb_ajax_nonce', 'nonce');
- $error = '';
-
if (!current_user_can('install_plugins'))
- $error = esc_html__('Sorry, you are not allowed to install plugins on this site.', 'addons-for-elementor-builder');
+ {
+ wp_send_json_error([
+ 'message' => esc_html__('Sorry, you are not allowed to install plugins on this site.', 'addons-for-elementor-builder'),
+ ], 403);
+ }
+
+ $error = '';
$plugins = isset($_POST['plugins']) ? map_deep($_POST['plugins'], 'sanitize_text_field') : [];
$time_limit = ini_get('max_execution_time');
@@ -294,6 +298,13 @@
{
check_ajax_referer('afeb_ajax_nonce', 'nonce');
+ if (!current_user_can('manage_options'))
+ {
+ wp_send_json_error([
+ 'message' => esc_html__('Sorry, you are not allowed to import template kit settings on this site.', 'addons-for-elementor-builder'),
+ ], 403);
+ }
+
$time_limit = ini_get('max_execution_time');
if (!did_action('elementor/loaded') || !class_exists(Plugin::class))
@@ -386,6 +397,13 @@
{
check_ajax_referer('afeb_ajax_nonce', 'nonce');
+ if (!current_user_can('manage_options'))
+ {
+ wp_send_json_error([
+ 'message' => esc_html__('Sorry, you are not allowed to import template kits on this site.', 'addons-for-elementor-builder'),
+ ], 403);
+ }
+
$args = [
'post_type' => [
'page',
--- a/addons-for-elementor-builder/app/Assets.php
+++ b/addons-for-elementor-builder/app/Assets.php
@@ -38,14 +38,14 @@
{
add_action('wp_enqueue_scripts', function ()
{
- wp_enqueue_script('wc-add-to-cart');
+ $this->enqueue_wc_add_to_cart_script();
$this->woo_product_image_style();
$this->woo_product_image_script();
$this->product_image();
$this->add_to_cart();
$this->woo_product_tags_style();
- });
+ }, 20);
}
if (is_admin())
@@ -67,7 +67,7 @@
});
}
- add_action('wp_enqueue_scripts', [$this, 'woo_add_to_cart_script']);
+ add_action('wp_enqueue_scripts', [$this, 'woo_add_to_cart_script'], 20);
add_action('elementor/editor/after_enqueue_styles', [$this, 'elementor_editor_styles']);
add_action('elementor/editor/after_enqueue_scripts', [$this, 'editor_script']);
}
@@ -184,18 +184,7 @@
public function add_to_cart()
{
- wp_enqueue_script(
- 'afeb-woo-atc-redirect',
- $this->assets_url('js/afeb-woo-atc-redirect.js'),
- ['jquery', 'wc-add-to-cart'],
- AFEB_VERSION,
- true
- );
- // Localize redirect URLs from WooCommerce
- wp_localize_script('afeb-woo-atc-redirect', 'afeb_atc_params', [
- 'cart_url' => function_exists('wc_get_cart_url') ? wc_get_cart_url() : '',
- 'checkout_url' => function_exists('wc_get_checkout_url') ? wc_get_checkout_url() : '',
- ]);
+ $this->enqueue_add_to_cart_redirect_script();
add_action('elementor/frontend/after_register_styles', function ()
{
@@ -1528,19 +1517,35 @@
public function woo_add_to_cart_script()
{
- if (class_exists('WooCommerce'))
+ $this->enqueue_wc_add_to_cart_script();
+ $this->enqueue_add_to_cart_redirect_script();
+ }
+
+ private function enqueue_wc_add_to_cart_script()
+ {
+ if (wp_script_is('wc-add-to-cart', 'registered'))
{
wp_enqueue_script('wc-add-to-cart');
}
+ }
+
+ private function enqueue_add_to_cart_redirect_script()
+ {
+ $is_enqueued = wp_script_is('afeb-woo-atc-redirect', 'enqueued');
wp_enqueue_script(
'afeb-woo-atc-redirect',
$this->assets_url('js/afeb-woo-atc-redirect.js'),
- ['jquery', 'wc-add-to-cart'],
+ ['jquery'],
AFEB_VERSION,
true
);
+ if ($is_enqueued)
+ {
+ return;
+ }
+
wp_localize_script('afeb-woo-atc-redirect', 'afeb_atc_params', [
'cart_url' => function_exists('wc_get_cart_url') ? wc_get_cart_url() : '',
'checkout_url' => function_exists('wc_get_checkout_url') ? wc_get_checkout_url() : '',
--- a/addons-for-elementor-builder/html/admin/menus/dashboard/fragments/content/dashboard/tpl.php
+++ b/addons-for-elementor-builder/html/admin/menus/dashboard/fragments/content/dashboard/tpl.php
@@ -55,6 +55,15 @@
<div class="afeb-changelog-list-box">
<div class="afeb-changelog-date">
+ <?php esc_html_e('March 25, 2026', 'addons-for-elementor-builder'); ?>
+ <span class="afeb-changelog-version"><?php esc_html_e('Version 1.7.0', 'addons-for-elementor-builder'); ?></span>
+ </div>
+ <ul class="afeb-changelog-list">
+ <li><?php esc_html_e('Improved : Made frontend dialogs more reliable.', 'addons-for-elementor-builder'); ?></li>
+ <li><?php esc_html_e('Fixed : Better protected required plugin activation and Templates Kit imports.', 'addons-for-elementor-builder'); ?></li>
+ <li><?php esc_html_e('Fixed : Improved support for custom scripts in the Custom CSS/JS Extension.', 'addons-for-elementor-builder'); ?></li>
+ </ul>
+ <div class="afeb-changelog-date">
<?php esc_html_e('February 27, 2026', 'addons-for-elementor-builder'); ?>
<span class="afeb-changelog-version"><?php esc_html_e('Version 1.6.4', 'addons-for-elementor-builder'); ?></span>
</div>