Plugin Directory

Changeset 2686340


Ignore:
Timestamp:
03/01/2022 06:50:50 AM (4 years ago)
Author:
mithublue
Message:

version:1.0.5.6

Location:
multislot-business-hours-for-dokan-vendor/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • multislot-business-hours-for-dokan-vendor/trunk/core/functions.php

    r2601270 r2686340  
    5757
    5858        if ( 'open' === $status ) {
    59             foreach ( $schedule as $key => $time ) {
    60                 if ( strpos( $key, 'opening_time' ) !== false ) {
    61                     if ( $time ) $is_filled_data++;
    62                     $time_key = (int) filter_var( $key, FILTER_SANITIZE_NUMBER_INT);
    63                     $time_key = ( $time_key ? '_'.$time_key : '' );
    64                     $opening_key = 'opening_time'. $time_key;
    65                     $closing_key = 'closing_time' . $time_key;
    66                     $open  = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule[$opening_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
    67                     $close = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule[$closing_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
    6859
    69                     if ( $open <= $current_time && $close >= $current_time ) {
    70                         return true;
    71                     }
     60            foreach ( $schedule['opening_time'] as $key => $time ) {
     61                if ( $time ) $is_filled_data++;
     62                $opening_key = $key;
     63                $closing_key = $key;
     64                $open  = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule['opening_time'][$opening_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
     65                $close = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule['closing_time'][$closing_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
     66                if ( $open <= $current_time && $close >= $current_time ) {
     67                    return true;
    7268                }
    7369            }
     
    8581        $str = '';
    8682        if ( 'open' === $schedule['status'] ) {
    87             foreach ( $schedule as $key => $time ) {
    88                 if ( strpos( $key, 'opening_time' ) !== false ) {
    89                     if ( $time ) $is_filled_data++;
    90                     $time_key = (int) filter_var( $key, FILTER_SANITIZE_NUMBER_INT);
    91                     $time_key = ( $time_key ? '_'.$time_key : '' );
    92                     $opening_key = 'opening_time'. $time_key;
    93                     $closing_key = 'closing_time' . $time_key;
    94                     $open  = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule[$opening_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
    95                     $close = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule[$closing_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
    96                     $open = $open ? date( 'H:i:s', $open->getTimestamp() ) : '';
    97                     $close = $close ? date('H:i:s', $close->getTimestamp() ) : '';
    98 
    99                     $str .= $open . '-' . $close.'/';
    100                     //$str .= ( $open ? date( 'H:i:s', $open->getTimestamp() ) : '' ) . '-' . ( $close ? date('H:i:s', $close->getTimestamp() . '/' ) : '' );
    101                 }
     83            foreach ( $schedule['opening_time'] as $key => $time ) {
     84                if ( $time ) $is_filled_data++;
     85                $opening_key = $key;
     86                $closing_key = $key;
     87                $open  = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule['opening_time'][$opening_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
     88                $close = \DateTimeImmutable::createFromFormat( esc_attr( get_option( 'time_format' ) ), $schedule['closing_time'][$closing_key], new \DateTimeZone( dokan_wp_timezone_string() ) );
     89                $open = $open ? date( 'H:i:s', $open->getTimestamp() ) : '';
     90                $close = $close ? date('H:i:s', $close->getTimestamp() ) : '';
     91                $str .= $open . '-' . $close.'/';
    10292            }
    10393        }
  • multislot-business-hours-for-dokan-vendor/trunk/multislot-business-hours-for-dokan-vendor.php

    r2638647 r2686340  
    44    Plugin URI:
    55    Description: Maintain Business hours for your WooCommerce Shop. Let your customers know about business schedules.
    6     Version: 1.0.1.5
     6    Version: 1.0.1.6
    77    Text Domain: doc
    88    Author: CyberCraft
  • multislot-business-hours-for-dokan-vendor/trunk/readme.txt

    r2638647 r2686340  
    77WC tested up to: 5.6.0
    88Requires PHP: 5.6
    9 Stable tag: 1.0.1.5
     9Stable tag: 1.0.1.6
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.