Plugin Directory

Changeset 2636836


Ignore:
Timestamp:
11/29/2021 12:56:39 PM (4 years ago)
Author:
mithublue
Message:

Version:1.0.1.4

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

Legend:

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

    r2601270 r2636836  
    3838    public function __construct() {
    3939        add_action( 'woocommerce_before_add_to_cart_form', [ $this, 'add_store_notice_badge'] );
     40        add_action( 'dokan_seller_listing_footer_content', [ $this, 'add_store_notice_badge_in_store_list'], 10, 2 );
    4041        add_action( 'pre_get_posts', [ $this, 'pre_get_posts']);
    4142        add_filter( 'posts_fields', [ $this, 'posts_fields' ], 10, 2 );
     
    108109        $vendor = dokan_get_vendor_by_product( $product );
    109110        $vendor_info = dokan_get_store_info( $vendor->id );
    110         if ( Functions::instance()->is_store_open( $vendor->id ) ) {
    111             ?>
    112             <span class="doc-store-notice doc-store-notice-open"><?php echo esc_attr( $vendor_info['dokan_store_open_notice'] ); ?></span>
    113 <?php
    114         } elseif ( ! Functions::instance()->is_store_open( $vendor->id ) ) {
     111        if ( Functions::instance()->is_store_open( $vendor->id ) ) {
     112            ?>
     113            <span class="doc-store-notice doc-store-notice-open"><?php echo esc_attr( $vendor_info['dokan_store_open_notice'] ); ?></span>
     114            <?php
     115        } elseif ( ! Functions::instance()->is_store_open( $vendor->id ) ) {
     116            ?>
     117            <span class="doc-store-notice doc-store-notice-close"><?php echo esc_attr( $vendor_info['dokan_store_close_notice'] ); ?></span>
     118            <?php
     119        }
     120    }
     121
     122    public function add_store_notice_badge_in_store_list( $seller, $store_info ) {
     123        if ( Functions::instance()->is_store_open( $seller->ID ) ) {
    115124            ?>
    116             <span class="doc-store-notice doc-store-notice-close"><?php echo esc_attr( $vendor_info['dokan_store_close_notice'] ); ?></span>
     125            <span class="doc-store-notice doc-store-notice-open"><?php echo esc_attr( $store_info['dokan_store_open_notice'] ); ?></span>
     126            <?php
     127        } elseif ( ! Functions::instance()->is_store_open( $seller->ID ) ) {
     128            ?>
     129            <span class="doc-store-notice doc-store-notice-close"><?php echo esc_attr( $store_info['dokan_store_close_notice'] ); ?></span>
    117130            <?php
    118131        }
  • multislot-business-hours-for-dokan-vendor/trunk/multislot-business-hours-for-dokan-vendor.php

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

    r2607293 r2636836  
    33Tags: Dokan, vendor open close, store open, business hours, open close, opening hours, store close,  store open close, multislot open close, multislot business hours, multivendor, Multislot, business hours, schedules, multi vendor marketplace, multi seller store, multi-vendor, multi seller, marketplace, product vendors, woocommerce vendor, e-commerce, woocommerce
    44Requires at least: 4.4
    5 Tested up to: 5.8.1
     5Tested up to: 5.8.2
    66WC requires at least: 3.0
    77WC tested up to: 5.6.0
    88Requires PHP: 5.6
    9 Stable tag: 1.0.1.3
     9Stable tag: 1.0.1.4
    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.