Skip to content

Commit 1c055d7

Browse files
fix: improve ajax error message within Elementor Editor
Update class-wcdp-form.php
1 parent 8181bca commit 1c055d7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

includes/class-wcdp-form.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public static function wcdp_donation_form_shortcode($atts = array()): string
3535
{
3636
// Do not allow executing this Shortcode via AJAX
3737
if (wp_doing_ajax()) {
38+
if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'elementor_ajax' && current_user_can('edit_posts')) {
39+
return esc_html__('Your donation form will be displayed here.', 'wc-donation-platform');
40+
}
3841
return esc_html__('This shortcode does not support AJAX calls.', 'wc-donation-platform');
3942
}
4043

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Active development of Donation Platform for WooCommerce: Fundraising & Donation
169169
fix: fee recovery checkbox not being applied
170170
fix: make $product variable global to avoid issues with some payment gateways
171171
fix: make sure order_counter only works for donation projects
172+
fix: improve ajax error message within Elementor editor
172173
tweak: improve WooCommerce Analytics disabled error message
173174
chore: switch to using wc_get_template() function
174175
chore: use wc_price for amount suggestions

0 commit comments

Comments
 (0)