• Hi,

    2 things:

    1. I’d like to show customers if a store is open or closed on the store list.

    2. Is it possible to set an automatic filter that shows the stores that are open first?

    Thank you in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WC Lovers

    (@wclovers)

    1. I’d like to show customers if a store is open or closed on the store list.

    – It’s possible.

    2. Is it possible to set an automatic filter that shows the stores that are open first?

    – This will not possible. We can hide closed stores from list.

    Thread Starter liekegunther

    (@liekegunther)

    Thank you for answering.

    How can I do the first thing then?

    Best!

    Plugin Author WC Lovers

    (@wclovers)

    Add this snippet to your site –

    add_filter( 'wcfmmp_store_list_after_store_info', function( $vendor_id, $store_info ) {
    	global $WCFMmp;
    	if( apply_filters( 'wcfm_is_pref_store_hours', true ) && $vendor_id && wcfm_is_vendor( $vendor_id ) ) {
    		$is_store_close = $WCFMmp->wcfmmp_store_hours->wcfmmp_is_store_close( $vendor_id );
    		if( $is_store_close ) {
    			?>
    			<p class="store-phone">
    				<i class="wcfmfa fa-times-circle" style="background:red!important;" aria-hidden="true"></i> <?php echo __( 'Close Now', 'wc-frontend-manager' ); ?>
    			</p>
    			<?php
    		} else {
    			?>
    			<p class="store-phone">
    				<i class="wcfmfa fa-check-circle" style="background:green!important;" aria-hidden="true"></i> <?php echo __( 'Open Now', 'wc-frontend-manager' ); ?>
    			</p>
    		  <?php
    		}
    	}
    }, 50, 2 );
    Thread Starter liekegunther

    (@liekegunther)

    Thank you so much.

    Another question – sorry – how can I switch the …km away on the store list off?

    Plugin Author WC Lovers

    (@wclovers)

    Add this line –

    add_filter( 'wcfm_is_allow_store_list_distance', '__return_false' );

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Open or closed’ is closed to new replies.