elementor / elementor/elementor

V3 Beta: Hook "elementor/element/{$stack_name}/{$section_id}/after_section_end" is triggered but UI not rendering/injecting in the stack

Open
#11,863 2 comments 0 reactions 0 assignees View on GitHub
mod/b* mod/q* type/developer-api
Dominant language
PHP
Stars
7.1k
Forks
1.6k
Avg merge
1d 5h
Merged PRs (30d)
193

Description

## Prerequisites

- [X] 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

Problem: Controls hooked to theme style stack is not injecting
Hook used: elementor/element/kit/section_body/after_section_end

![controls_ui_not_rendered_theme_style](https://user-images.githubusercontent.com/4319097/87398543-a24dcb00-c5d3-11ea-93cd-dc5bdd8e606a.png)

## Steps to reproduce

```
start_controls_section(
'my_custom',
[
'label' => __( 'My Custom specific', 'plugin-name' ),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
]
);

$section->add_control(
'control-name',
[
'label' => __( 'Control Name', 'plugin-name' ),
'type' => \Elementor\Controls_Manager::TEXT,
]
);

$section->add_control(
'my_custom_css',
array(
'label' => __( 'Export Custom CSS', 'ang' ),
'type' => 'button',
'text' => __( 'Export', 'ang' ),
)
);

#End Custom Settings Section
$section->end_controls_section();

}, 999, 2 );
```

1. Copy-Paste the above snippet in either active theme's `functions.php` file or your custom plugin
2. Refresh the Elementor editor page
3. Go to theme style stack
4. You will not see the new custom control next to the control background in V3 Beta but in V2 it's injecting/rendering

What is the best way to add a section to ‘Theme Style’.

## Isolating the problem

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

## Environment

System Info
```

```

[PasteBin Link](https://pastebin.com/MS3bznRg)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.