Plugin Directory

Changeset 3023869


Ignore:
Timestamp:
01/19/2024 07:20:09 AM (2 years ago)
Author:
wpscripts
Message:

Plugin version updated to 1.4.8.3

Location:
food-store
Files:
348 added
8 edited

Legend:

Unmodified
Added
Removed
  • food-store/trunk/assets/css/foodstore-checkout-style.css

    r2807676 r3023869  
    109109}
    110110
     111#wfs_checkout_fields .nav-link {
     112  cursor: pointer;
     113}
     114
    111115/* Checkout Page Services UI Ends*/
    112116
  • food-store/trunk/assets/css/foodstore-style.css

    r2816876 r3023869  
    284284  height: 41px;
    285285  padding: 10px;
     286}
     287
     288.wfsmodal .nav-link {
     289  cursor: pointer;
    286290}
    287291
     
    681685  bottom: -11px;
    682686}
    683 /* Mini cart ends */ ;
     687/* Mini cart ends */
  • food-store/trunk/food-store.php

    r3020137 r3023869  
    99 * Plugin Name: Food Store - Online Food Delivery & Pickup
    1010 * Description: Food Store is complete online food ordering platform with all your favourite WooCommerce functionalities.
    11  * Version: 1.4.8.2
     11 * Version: 1.4.8.3
    1212 * Author: WP Scripts
    1313 * Text Domain: food-store
  • food-store/trunk/includes/admin/class-wfs-admin-menus.php

    r2689841 r3023869  
    2828    // Handle saving settings earlier than load-{page} hook to avoid race conditions in conditional menus.
    2929    add_action( 'wp_loaded', array( $this, 'save_settings' ) );
     30
     31    //Show Order online submenu from admin menu bar
     32    add_action( 'admin_bar_menu', array( $this, 'admin_bar_menus' ), 31 );
    3033  }
    3134
     
    8184    }
    8285  }
     86
     87  /**
     88     * Add the "Visit Order Online" link in admin bar main menu.
     89     *
     90     * @since 1.4.8.3
     91     * @param WP_Admin_Bar $wp_admin_bar Admin bar instance.
     92     */
     93    public function admin_bar_menus( $wp_admin_bar ) {
     94        if ( ! is_admin() || ! is_admin_bar_showing() ) {
     95            return;
     96        }
     97
     98        // Show only when the user is a member of this site, or they're a super admin.
     99        if ( ! is_user_member_of_blog() && ! is_super_admin() ) {
     100            return;
     101        }
     102
     103        // Don't display when shop page is the same of the page on front.
     104        if ( intval( get_option( 'page_on_front' ) ) === wfs_get_page_id( 'order_online' ) ) {
     105            return;
     106        }
     107
     108        // Add an option to visit the order online page.
     109        $wp_admin_bar->add_node(
     110            array(
     111                'parent' => 'site-name',
     112                'id'     => 'view-order-online-page',
     113                'title'  => __( 'Visit Order Online', 'food-store' ),
     114                'href'   => wfs_get_page_permalink( 'order_online' ),
     115            )
     116        );
     117    }
    83118}
    84119return new WFS_Admin_Menus();
  • food-store/trunk/includes/class-food-store.php

    r3020137 r3023869  
    2121     * @var string
    2222     */
    23     public $version = '1.4.8.2';
     23    public $version = '1.4.8.3';
    2424
    2525    /**
  • food-store/trunk/includes/class-wfs-services.php

    r3020137 r3023869  
    229229          if ( isset( $_GET['type'] ) && !empty( $_GET['type'] ) ) {
    230230            $service_type = isset( $_GET['type'] ) ? sanitize_text_field( $_GET['type'] ) : 'pickup';
     231            $asap_label   = get_option( '_wfs_asap_label', true );
     232            $service_later_class = ( $asap_label !== $service_time ) ? 'active show' : '';
    231233            echo '<div class="tab-content">';
    232             echo '<div class="tab-pane active"
     234            echo '<div class="tab-pane '.$service_later_class.' "
    233235    id="'.$service_type.'_asap" role="tabpanel" aria-labelledby="'.$service_type.'_asap-tab">';
    234236            echo '</div>';
     
    586588    * @since 1.4.7
    587589    * @param html $field
    588         * @param empty $key
    589         * @param array $args
    590         * @param string $value
    591         * @return html $field
     590    * @param empty $key
     591    * @param array $args
     592    * @param string $value
     593    * @return html $field
    592594    */
    593   public function woocommerce_form_field_checkout_asap_fields( $field, $key, $args, $value ) {
    594     if ( isset( $args['type'] ) && !empty( $args['type'] ) ) {
    595             if ( $args['type'] == 'checkout_asap_fields' ) {
    596         $service_type = isset( $_GET['type'] ) ? $_GET['type'] : 'pickup';
    597                 $asap_label                 = wfs_get_asap_label();
    598                 $order_later_label  = wfs_get_order_later_label();
    599         $field = '<ul class="form-row nav-tabs nav checkout-asap-block wfs-schedule-nav-group" role="tablist">
    600                         <li class="nav-item">
    601                           <a class="nav-link active" data-toggle="tab" role="tab" aria-controls="'.$service_type.'_asap" aria-selected="true" >'.$asap_label.'</a>
    602                           </li>
    603                           <li class="nav-item">
    604                           <a class="nav-link" data-toggle="tab" role="tab" aria-controls="'.$service_type.'_schedule" aria-selected="false">'.$order_later_label.'</a>
    605                           </li>
    606                       </ul>
    607         ';
    608             }
    609         }
     595    public function woocommerce_form_field_checkout_asap_fields( $field, $key, $args, $value ) {
     596        if ( isset( $args['type'] ) && !empty( $args['type'] ) ) {
     597            if ( $args['type'] == 'checkout_asap_fields' ) {
     598                $service_type       = isset( $_GET['type'] ) ? $_GET['type'] : 'pickup';
     599                $asap_label         = wfs_get_asap_label();
     600                $order_later_label  = wfs_get_order_later_label();
     601                $service_time       = isset( $_COOKIE['service_time'] ) ? wp_unslash( $_COOKIE['service_time'] ) : '';
     602                $field = '<ul class="form-row nav-tabs nav checkout-asap-block wfs-schedule-nav-group" role="tablist">
     603                            <li class="nav-item">
     604                                <a class="nav-link '.wfs_selected_service_type( $service_type, $service_time, 'asap' ).'  " data-toggle="tab" role="tab" aria-controls="'.$service_type.'_asap" aria-selected="true" >'.$asap_label.'</a>
     605                            </li>
     606                            <li class="nav-item">
     607                                <a class="nav-link '.wfs_selected_service_type( $service_type, $service_time, 'schedule' ).' " data-toggle="tab" role="tab" aria-controls="'.$service_type.'_schedule" aria-selected="false">'.$order_later_label.'</a>
     608                            </li>
     609                        </ul>
     610                    ';
     611            }
     612        }
    610613        return $field;
    611614    }
  • food-store/trunk/includes/wfs-core-functions.php

    r2978955 r3023869  
    259259  $output = apply_filters( 'wfs_service_details_text', $output );
    260260
    261   if( ! empty( $service_time ) ) {
     261  if( ! empty( $service_time ) && !empty( $service_type ) ) {
    262262    $hidden_class = '';
    263263  } else {
     
    11361136  return $cart_style;
    11371137}
     1138
     1139/**
     1140 * Make selected service type and time selected on checkout page
     1141 */
     1142function wfs_selected_service_type( $service_type, $service_time, $service_label ) {
     1143  $asap_label               = wfs_get_asap_label();
     1144  $asap_label         = strtolower( $asap_label );
     1145
     1146    $order_later_label  = wfs_get_order_later_label();
     1147  $order_later_label  = strtolower( $order_later_label );
     1148
     1149  $selected_class = '';
     1150
     1151  if ( $service_label == 'asap' && strtolower( $service_time ) == $asap_label ) {
     1152    $selected_class = 'active show';
     1153  }
     1154
     1155  if( $service_label == 'schedule' && strtolower( $service_time ) !== $asap_label )  {
     1156    $selected_class = 'active show';
     1157  }
     1158
     1159  return $selected_class;
     1160}
  • food-store/trunk/readme.txt

    r3020137 r3023869  
    66Requires at least: 4.0
    77Tested up to: 6.4
    8 Stable tag: 1.4.8.2
     8Stable tag: 1.4.8.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    131131
    132132== Changelog ==
     133
     134= 1.4.8.2 - 19-01-2024 =
     135* Fix - Service type selection issue on checkout page with few themes
     136* Fix - Service type issue on listing page after order is completed
     137* Enhancement - Added admin bar submenu for order online page
     138* Fix - CSS update for checkout page
     139* Minor code cleanup
    133140
    134141= 1.4.8.2 - 11-01-2024 =
     
    485492== Upgrade Notice ==
    486493
    487 = 1.4.8.1
     494= 1.4.8.3
    488495New version is available. Thank you for trying out our new features. Reach us anytime to report any bug or getting support.
Note: See TracChangeset for help on using the changeset viewer.