Here is a code snippet to set GeoDirectory Business hours to ‘yes’ in the add listing form by default
add_action( 'geodir_after_add_listing_form', 'gdsnippet_08ghhbub_maybe_toggle_business_hour');
function gdsnippet_08ghhbub_maybe_toggle_business_hour() {
global $gd_post;
if (
! empty( $gd_post ) && ! empty( $gd_post->post_status ) && $gd_post->post_status == 'auto-draft'
) {
?>
<script>
window.addEventListener('load', () => {
if ( typeof jQuery !== 'function' ) return;
jQuery('#business_hours_row .fwrap-business_hours_f_active-1 #business_hours_f_active0').trigger('click');
});
</script>
<?php
}
}