Plugin Directory

Changeset 2770371


Ignore:
Timestamp:
08/14/2022 09:45:37 PM (4 years ago)
Author:
jaedm97
Message:

new version released

Location:
woc-open-close
Files:
224 added
8 edited

Legend:

Unmodified
Added
Removed
  • woc-open-close/trunk/assets/front/css/style.css

    r2714035 r2770371  
    15991599
    16001600
    1601 
    1602 
    16031601/* ---------------------------------
    16041602    Layout 9 Start Here
     
    19711969    background-color: #FFF9EE;
    19721970}
    1973 
    19741971
    19751972
     
    21342131    font-family: Open Sans, sans-serif;
    21352132    padding: 13px 0;
     2133    visibility: hidden;
    21362134}
    21372135
     
    22342232        padding-bottom: 20px;
    22352233    }
     2234
    22362235    .wooopenclose-layout-6 .wooopenclose-schedules-style-1 .wooopenclose-schedule {
    22372236        flex: initial;
  • woc-open-close/trunk/assets/front/js/scripts.js

    r2767408 r2770371  
    1 jQuery(document).ready(function ($) {
     1(function ($, window, document, pluginObject) {
     2
     3    function wooOpenCloseUpdateTime($element) {
     4
     5        let timerUniqueID = $element.data('unique-id'),
     6            timerArea = $element.parent().find("#wooopenclose-countdown-timer-" + timerUniqueID),
     7            spanDistance = timerArea.find('span.distance'),
     8            distance = parseInt(spanDistance.data('distance')),
     9            spanHours = timerArea.find('span.hours > span.count-number'),
     10            spanMinutes = timerArea.find('span.minutes > span.count-number'),
     11            spanSeconds = timerArea.find('span.seconds > span.count-number'),
     12            days = 0, hours = 0, minutes = 0, seconds = 0;
     13
     14        if (distance > 0) {
     15            days = Math.floor(distance / (60 * 60 * 24));
     16            hours = Math.floor((distance % (60 * 60 * 24)) / (60 * 60) + days * 24);
     17            minutes = Math.floor((distance % (60 * 60)) / (60));
     18            seconds = Math.floor((distance % (60)));
     19        }
     20
     21        spanHours.html(hours);
     22        spanMinutes.html(minutes);
     23        spanSeconds.html(seconds);
     24        spanDistance.data('distance', distance - 1);
     25
     26        setTimeout(wooOpenCloseUpdateTime, 1000, $element);
     27    }
     28
     29    $(document).on('ready updated_cart_totals', function () {
     30        $('.wooopenclose-countdown-timer').each(function () {
     31            wooOpenCloseUpdateTime($(this));
     32        });
     33    });
     34
    235
    336    $(document).on('click', '.wooopenclose-layout-1 .wooopenclose-schedules .wooopenclose-schedule .wooopenclose-day-name, .wooopenclose-layout-5 .wooopenclose-schedules .wooopenclose-schedule .wooopenclose-day-name', function () {
     
    1447    });
    1548
     49
    1650    $(document).on('click', '.shop-status-bar .shop-status-bar-inline.close-bar', function () {
    1751        $(this).parent().slideUp('slow');
    1852    });
     53
    1954
    2055    $(document).on('click', '.wooopenclose-add-to-cart', function () {
     
    2560        }
    2661    });
     62
    2763
    2864    // jBox popup
     
    3874    });
    3975
    40 });
     76
     77    //Set cookie
     78    $(document).on('click', '.set-cookie', function () {
     79        const currentTime = new Date();
     80        currentTime.setTime(currentTime.getTime() + (24 * 60 * 60 * 1000));
     81        Cookies.set('wooopenclose-ignore-popup', 1, {expires: currentTime});
     82    });
     83
     84    // Hide popup-bar
     85    const getCookie = Cookies.get('wooopenclose-ignore-popup');
     86    if (getCookie) {
     87        $('.shop-status-bar').css('visibility', 'hidden');
     88    } else {
     89        $('.shop-status-bar').css('visibility', 'visible');
     90    }
     91
     92   
     93})(jQuery, window, document, wooopenclose);
  • woc-open-close/trunk/includes/classes/class-functions.php

    r2769968 r2770371  
    192192        $image_for = in_array( $image_for, array( 'open', 'close' ) ) ? $image_for : 'open';
    193193        $image     = Utils::get_option( "woc_bh_image_{$image_for}" );
    194         $image_url = $image['url'];
     194        $image_url = isset( $image['url'] ) ? $image['url'] : '';
    195195
    196196        return apply_filters( 'woc_filters_status_image', $image_url, $image_for, $image );
  • woc-open-close/trunk/includes/functions.php

    r2767408 r2770371  
    426426        ob_start();
    427427
    428         if ( in_array( 'yes', (array) Utils::get_option( 'woc_bh_check_icon', array( 'yes' ) ) ) ) {
     428        if ( Utils::get_option( 'woc_bh_check_icon' ) ) {
    429429            printf( '<span class="%s"></span>', Utils::get_args_option( 'check_icon_class', $args ) );
    430430        }
  • woc-open-close/trunk/readme.txt

    r2769968 r2770371  
    77   Tested up to: 6.0.1
    88   Tested up to WooCommerce: 6.8.0
    9    Stable tag: 4.3.6
     9   Stable tag: 4.3.7
    1010   Requires PHP: 5.6 
    1111   Requires WooCommerce: 3.0 
     
    264264    = 4.3.6 =
    265265    * 13/08/2022 - FIX - Pro version issue fixed.
     266
     267    = 4.3.7 =
     268    * 14/08/2022 - NEW - Hide button of store status bar hides actually for specific time.
     269    * 15/08/2022 - FIX - After update cart timer issue has been fixed.
    266270 
    267271== Upgrade Notice == 
  • woc-open-close/trunk/templates/countdown-timer.php

    r2767408 r2770371  
    1313$time_diff     = date( 'U', strtotime( wooopenclose()->get_next_time() ) ) - date( 'U' );
    1414
    15 
    1615?>
    1716
    18 <div id="wooopenclose-countdown-timer-<?php echo esc_attr( $unique_id ); ?>" class="wooopenclose-countdown-timer-<?php echo esc_attr( $style ); ?> <?php echo esc_attr( $dynamic_class ); ?>">
     17<div id="wooopenclose-countdown-timer-<?php echo esc_attr( $unique_id ); ?>"
     18     data-unique-id="<?php echo esc_attr( $unique_id ); ?>"
     19     class="wooopenclose-countdown-timer wooopenclose-countdown-timer-<?php echo esc_attr( $style ); ?> <?php echo esc_attr( $dynamic_class ); ?>">
    1920    <span style="display: none;" class="distance" data-distance="<?php echo esc_attr( $time_diff ); ?>"></span>
    2021    <span class="hours"><span class="count-number">0</span><?php printf( '<span class="count-text">%s</span>', Utils::get_option( 'woc_timer_text_hours', esc_html__( 'Hours', 'woc-open-close' ) ) ); ?></span>
     
    2223    <span class="seconds"><span class="count-number">0</span><?php printf( '<span class="count-text">%s</span>', Utils::get_option( 'woc_timer_text_seconds', esc_html__( 'Seconds', 'woc-open-close' ) ) ); ?></span>
    2324</div>
    24 
    25 <script>
    26     (function ($) {
    27         "use strict";
    28 
    29         (function updateTime() {
    30 
    31             let timerArea = $("#wooopenclose-countdown-timer-<?php echo esc_attr( $unique_id ); ?>"),
    32                 spanDistance = timerArea.find('span.distance'),
    33                 distance = parseInt(spanDistance.data('distance')),
    34                 spanHours = timerArea.find('span.hours > span.count-number'),
    35                 spanMinutes = timerArea.find('span.minutes > span.count-number'),
    36                 spanSeconds = timerArea.find('span.seconds > span.count-number'),
    37                 days = 0, hours = 0, minutes = 0, seconds = 0;
    38 
    39             if (distance > 0) {
    40                 days = Math.floor(distance / (60 * 60 * 24));
    41                 hours = Math.floor((distance % (60 * 60 * 24)) / (60 * 60) + days * 24);
    42                 minutes = Math.floor((distance % (60 * 60)) / (60));
    43                 seconds = Math.floor((distance % (60)));
    44             }
    45 
    46             spanHours.html(hours);
    47             spanMinutes.html(minutes);
    48             spanSeconds.html(seconds);
    49             spanDistance.data('distance', distance - 1);
    50 
    51             setTimeout(updateTime, 1000);
    52         })();
    53 
    54     })(jQuery);
    55 </script>
  • woc-open-close/trunk/templates/shop-status-bar.php

    r2767408 r2770371  
    2222    <?php if ( wooopenclose()->is_display_bar_btn() ) : ?>
    2323
    24         <div class="shop-status-bar-inline close-bar">
     24        <div class="shop-status-bar-inline close-bar set-cookie">
    2525            <?php printf( '<span>%s</span>', wooopenclose()->get_bar_btn_text() ); ?>
    2626        </div>
  • woc-open-close/trunk/woc-open-close.php

    r2769968 r2770371  
    44    Plugin URI: https://pluginbazar.com/plugin/woocommerce-open-close/
    55    Description: Open Close WooCommerce store automatically with predefined schedules. Stop getting orders when your store is closed.
    6     Version: 4.3.6
     6    Version: 4.3.7
    77    Text Domain: woc-open-close
    88    Author: Pluginbazar
Note: See TracChangeset for help on using the changeset viewer.