as the title says, I’m trying to hook into Elementor’s exisiting CTA-widget and turn the existing input field into a WYSIWYG-field by looking at the widget’s structure etc. within elementor pro directory. But somehow nothing happens. If I change it in the plugins source file it works, but sure I want to override it through my functions.php.
I’ve done this for the slides Widget before and that worked well. What am I missing here?
/*
* Set Elementor > CTA widget description as wysiwyg Text Editor
*/
add_action( 'elementor/element/call-to-action/section_content/before_section_end', function( $widget, $args ) {
$cta_control = ElementorPlugin::instance()->controls_manager->get_control_from_stack( $widget->get_unique_name(), 'call-to-action' );
if ( is_wp_error( $cta_control ) ) {
return;
}
$cta_control['fields']['description']['type'] = ElementorControls_Manager::WYSIWYG;
$widget->update_control( 'call-to-action', $cta_control );
},10 ,2 );
Any help appreciated. Thank you.