Possible conflict with Countdown elementor fix
-
Hello —
I’m applying a fix to the Countdown elementor widget since it doesn’t support Dynamic Tags. However, it looks like the Dynamic Conditions plugin might be preventing the suggested code from working.
Here’s what is suggested to add to the code to enable server-side customization of the Countdown widget (from https://github.com/elementor/elementor/issues/7737):
add_action( ‘init’, function(){
add_action( ‘elementor/frontend/widget/before_render’, function ( \Elementor\Element_Base $element ) {
if ( ! $element->get_settings( ‘due_date’ ) ) {
return;
}
// field name goes here
$countdown_date = get_field(‘ending_date’);
$element->set_settings( ‘due_date’, date(‘Y-m-d H:i’,strtotime($countdown_date))) ;
} );
});This should be working and the code does indeed do what it’s supposed to, but set_settings doesn’t seem to have any effect.
Is Dynamic Conditions interfering with element->set_settings?
- The topic ‘Possible conflict with Countdown elementor fix’ is closed to new replies.