• Resolved agbruce

    (@agbruce)


    The setting “Hide the opening hours?” doesn’t affect the [wpsl_hours] shortcode, meaning the shortcode will continue to show the opening hours despite this setting being enabled.

    Furthermore, the code provided on https://wpstorelocator.co/document/show-opening-hours-in-search-results/ does not support this setting, resulting in listing failure when the setting is enabled. I fixed this by adding an ‘if’ statement:

    	if ( !$wpsl_settings['hide_hours'] ) {
    		$listing_template .= "\t\t\t" . '<% if ( hours ) { %>' . "\r\n";
    		$listing_template .= "\t\t\t" . '<p><%= hours %></p>' . "\r\n";
    		$listing_template .= "\t\t\t" . '<% } %>' . "\r\n";
    	}
Viewing 1 replies (of 1 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Thanks for letting me know.

    There’s a check in the main code for the single stores page to check if the hours shortcode should run, but if you use the wpsl_hours shortcode somewhere else then it makes sense that it should respect the setting as well.

    I will change that in the next update, and update the documentation.

Viewing 1 replies (of 1 total)
  • The topic ‘Bugs relating to the “Hide the opening hours?” setting’ is closed to new replies.