Support » Plugin: Event Organiser » [Plugin: Event Organiser] Event with "Reoccurrence: Custom" returns false for eo_reoccurs(

  • Resolved gilomen2

    (@gilomen2)


    I have an event with reoccurrence set for multiple non-concurrent dates. In my single-event.php, I am trying to check if an event is recurring with eo_reoccurs(), but that event is returning false. If I set the same event to reoccur weekly, the code works as expected.

    Here is the code I’m using:

    <?php
    
    	echo '<div class="left half"><h4>Event occurs:</h4><ul>';
    									if(!eo_reoccurs()){
    										echo "This is <b>not</b> recurring";
    										if(eo_is_all_day()){
    											echo "<li>";
    											echo eo_get_the_start('F j, Y');
    											if(eo_get_the_end('F j, Y') > eo_get_the_start('F j, Y')){
    												echo " - ";
    												echo eo_get_the_end('F j, Y');
    											}
    											echo "</li>";
    										}
    										else{
    											echo "<li>";
    											echo eo_get_the_start('F j, Y');
    											echo " at ";
    											echo eo_get_the_start('g:i a');
    											if(eo_get_the_end('F j, Y') > eo_get_the_start('F j, Y')){
    												echo " - ";
    												echo eo_get_the_end('F j, Y');
    												echo " at ";
    												echo eo_get_the_end('g:i a');
    												echo "</li>";
    											}
    											else{
    												echo " - ";
    												echo eo_get_the_end('g:i a');
    												echo "</li>";
    												}
    										}
    									}
    									else{
    										echo "This is recurring";
    										$occurrences = eo_get_the_occurrences();
    										if($occurrences){
    											foreach ($occurrences as $occurrence){
    										               echo '<li>';
    										               echo $occurrence->format('F j, Y');
    										               if(!eo_is_all_day()){
    													      echo " at ";
    													      echo eo_get_the_start('g:i a');
    													      echo " - ";
    													      echo eo_get_the_end('g:i a');
    													      }
    													   else{
    														  echo eo_get_the_end('F j, Y');
    													   }
    													   echo '</li>';
    										          }
    										  }
    									}
    									echo '</ul></div>';
    								?>

    Here is the event in question: http://benfrank.statestreetdigital.com/classes-and-events/event/cake-decorating-basics/

    Here is a screenshot of the options (in case I have them configured incorrectly): https://dl.dropbox.com/u/8132517/recurrenceissue.png

    http://wordpress.org/extend/plugins/event-organiser/

Viewing 1 replies (of 1 total)
  • Stephen Harris

    (@stephenh1988)

    Hi gilomen2 this is a minor bug with that function, and will be fixed shortly. It was raised in this thread and Andrebalza suggests an immediate work around (though using eo_reoccurs() is recommended). I’ve also posted the fix in case you want to make the changes yourself before the update is released.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Event Organiser] Event with "Reoccurrence: Custom" returns false for eo_reoccurs(’ is closed to new replies.