Skip to content

Widget hooks are not working in Elementor. #5844

@hectorfarahani

Description

@hectorfarahani

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

Description

Many users are using in_widget_form and widget_update_callback hooks to add custom fields to widgets.
Seems that Elementor doesn't calls these hooks at all. There is no visible custom markup in widget form while using widgets from Elementor and it shows only default widget fields.

Also there is some plugins that are using these hooks to extend widgets functionality. (e.g. Advanced Custom Fields) and these hooks are necessary for them.

Steps to reproduce

Use the following code to add something in widgets. It works in Appearance-> Widgets, But not in Elementor-> WordPress Widgets.

add_action('in_widget_form', 'issue_in_widget_form' );

function issue_in_widget_form( $instance ){
    echo 'This should be visible in Elementor too.';
    return $instance;
}

Isolating the problem

  • This bug happens with only Elementor plugin active (and Elementor Pro).
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/mergedIndicates when a Pull Request has been merged to a Release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions