impress-org / givewp-elementor-widgets

Adding all GiveWP shortcodes as Elementor widgets
GNU General Public License v3.0
2 stars 0 forks source link

Fix: Edit Form Grid Block with Elementor Pro #15

Closed alaca closed 2 years ago

alaca commented 2 years ago

Resolves #14

Description

This PR resolves issues where Give Elementor widgets Give Form Grid, Give Donor Wall, and Give Profile Editor was not possible to edit when Elementor Pro was activated. The problem was in widget configuration, more specifically, each widget that had more than two spaces inside the name definition was not working. For example, if we define widget name as Give Form Grid, that won't work when Elementor Pro is activated, but definitions like Form Grid will work. The issue is resolved by simply changing the widget's name to a string that doesn't contain spaces. The name change fix is a breaking change for our users, meaning that widgets that have name definition updated won't be visible in Elementor editor anymore and users will have to re-insert them. Because of that, only Give Form Grid, Give Donor Wall, and Give Profile Editor have name definitions updated.

Also, deprecated Elementor API function calls are updated as well.

Edit: fix for this issue is also included in this PR.

Affects

Give Form Grid, Give Donor Wall, and Give Profile Editor widgets

Visuals

Screen Capture_select-area_20220324154354

Testing Instructions

You will need Elementor Pro which you can get from here https://drive.google.com/drive/u/0/folders/1S7O7r7GTMA7YS8NG8fBSP-Db7DbZVtCU

  1. After you setup Elementor and activated Elementor pro, add a new WP page
  2. Insert Give Form Grid widget into the page
  3. Click somewhere outside the inserted widget so that is not focused ( widget controls should be hidden now )
  4. Now click on the widget again ( widget controls should be visible now )

Pre-review Checklist

alaca commented 2 years ago

This works well! Since Widgets_Manager::register() got introduced in Elementor 3.5, could you bump the required Elementor version to match that?

Good catch! Resolved f0f20a9f