Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @tacraw88 this is about action priority. We just wrote a quick fix on our side. In dynamic-countdown-with-acf-elementor.php add a slightly higher priority like this:

    add_action( 'init', function(){
        add_action( 'elementor/frontend/widget/before_render', function ( \Elementor\Element_Base $element ) {
    
            if ( "countdown"  != $element->get_name() ) {
                return;
            }
                   
            echo "<script>console.log('".$element->get_name()."')</script>";
    
            //Get the field specified on options page
            $countdown_date = get_field(get_option('dcae_kiiraklis94_acf_field'));
                   
            echo "<script>console.log('".$countdown_date."')</script>";
    
            //Do the thing
            $element->set_settings( 'due_date', date('Y-m-d H:i',strtotime($countdown_date))) ;
        }, 5, 1);
    });

    Note the , 5, 1); at the end of the the add_action function parmeters

    @teamrws this is about action priority. We just wrote a quick fix on our side. In dynamic-countdown-with-acf-elementor.php add a slightly higher priority like this:

    add_action( 'init', function(){
        add_action( 'elementor/frontend/widget/before_render', function ( \Elementor\Element_Base $element ) {
    
            if ( "countdown"  != $element->get_name() ) {
                return;
            }
                   
            echo "<script>console.log('".$element->get_name()."')</script>";
    
            //Get the field specified on options page
            $countdown_date = get_field(get_option('dcae_kiiraklis94_acf_field'));
                   
            echo "<script>console.log('".$countdown_date."')</script>";
    
            //Do the thing
            $element->set_settings( 'due_date', date('Y-m-d H:i',strtotime($countdown_date))) ;
        }, 5, 1);
    });

    Note the , 5, 1); at the end of the the add_action function parameters

Viewing 2 replies - 1 through 2 (of 2 total)