Plugin Directory

Changeset 3002003


Ignore:
Timestamp:
11/27/2023 06:13:14 AM (2 years ago)
Author:
keylorcr
Message:

Update v1.8.6

Location:
wc-pickup-store
Files:
38 added
9 edited

Legend:

Unmodified
Added
Removed
  • wc-pickup-store/trunk/includes/admin/wps-admin.php

    r2904913 r3002003  
    8686/**
    8787 * Save the custom field.
     88 *
     89 * @version 1.8.6
     90 * @since 1.x
     91 *
     92 * @param WC_Order $order
    8893 */
    89 function wps_store_save_order_meta($order_id) {
     94function wps_store_save_order_meta( $order ) {
    9095    $current_user = wp_get_current_user();
    9196    $user_id = $current_user->ID;
     
    9499
    95100    if ( $store ) {
    96         update_post_meta($order_id, '_shipping_pickup_stores', $store);
    97         update_user_meta($user_id, '_shipping_pickup_stores', $store);
     101        update_user_meta( $user_id, '_shipping_pickup_stores', $store );
     102        $order->add_meta_data( '_shipping_pickup_stores', $store );
     103        // $order->save() is triggered from parent create_order method
    98104    }
    99105}
    100 add_action('woocommerce_checkout_update_order_meta', 'wps_store_save_order_meta');
     106add_action( 'woocommerce_checkout_create_order', 'wps_store_save_order_meta' );
    101107
    102108/**
     
    129135 * Check store field before allow checkout to proceed.
    130136 *
     137 * @version 1.8.5
    131138 * @since 1.5.x
    132  * @version 1.8.5
    133139 */
    134140function wps_store_validate_checkout( $data ) {
     
    150156/**
    151157 * Add selected store to billing details, admin page
     158 *
     159 * @version 1.8.6
     160 * @since 1.x
     161 *
     162 * @param WC_Order $order
    152163 */
    153 function wps_show_store_in_admin($order) {
    154     $order_id = $order->get_id();
    155     $store = (!empty(wps_get_post_meta($order_id, '_shipping_pickup_stores'))) ? wps_get_post_meta($order_id, '_shipping_pickup_stores') : '';
     164function wps_show_store_in_admin( $order ) {
     165    $store = $order->get_meta( '_shipping_pickup_stores' );
    156166   
    157     if(!empty($store)) :
     167    if ( !empty( $store ) ) {
    158168        ?>
    159169        <p>
     
    162172        </p>
    163173        <?php
    164     endif;
     174    }
    165175}
    166176add_action('woocommerce_admin_order_data_after_billing_address', 'wps_show_store_in_admin');
  • wc-pickup-store/trunk/includes/class-wps-init.php

    r2904913 r3002003  
    157157            }
    158158   
    159             public function wc_reordering_order_item_totals($total_rows, $order, $tax_display)
    160             {
    161                 /* Update 1.5.9 */
    162                 $order_id = $order->get_id();
    163                 $store = wps_get_post_meta($order_id, '_shipping_pickup_stores');
    164                 $formatted_title = (!empty($this->costs) && $this->costs_per_store != 'yes') ? $this->title . ': ' . wc_price($this->wps_get_calculated_costs($this->costs, true, $order)) : $this->title;
     159            /**
     160             * @version 1.8.6
     161             * @since 1.x
     162             *
     163             * @param array $total_rows
     164             * @param WC_Order $order
     165             * @param string $tax_display Tax to display.
     166             */
     167            public function wc_reordering_order_item_totals( $total_rows, $order, $tax_display )
     168            {
     169                $store = $order->get_meta( '_shipping_pickup_stores' );
     170                $formatted_title = ( !empty( $this->costs ) && $this->costs_per_store != 'yes' ) ? $this->title . ': ' . wc_price( $this->wps_get_calculated_costs( $this->costs, true, $order ) ) : $this->title;
    165171                $item_label[] = __('Pickup Store', 'wc-pickup-store');
    166                 if (!empty($this->checkout_notification))
     172                if ( !empty( $this->checkout_notification ) ) {
    167173                    $item_label[] = $this->checkout_notification;
    168    
    169                 if($order->has_shipping_method($this->id) && !empty($store)) {
    170                     foreach ($total_rows as $key => $row) {
     174                }
     175   
     176                if ( $order->has_shipping_method( $this->id ) && !empty( $store ) ) {
     177                    foreach ( $total_rows as $key => $row ) {
    171178                        $new_rows[$key] = $row;
    172                         if($key == 'shipping') {
     179                        if ( $key == 'shipping' ) {
    173180                            $new_rows['shipping']['value'] = $formatted_title; // Shipping title
    174181                            $new_rows[$this->id] = array(
    175                                 'label' => apply_filters('wps_order_shipping_item_label', implode(': ', $item_label), $this->checkout_notification),
     182                                'label' => apply_filters( 'wps_order_shipping_item_label', implode( ': ', $item_label ), $this->checkout_notification ),
    176183                                'value' => $store
    177184                            );
  • wc-pickup-store/trunk/includes/cpt-store.php

    r2904913 r3002003  
    1919add_filter('manage_edit-store_columns', 'wps_store_id_columns');
    2020
    21 function wps_store_id_column_content($name, $post_id) {
    22     $exclude_store = get_post_meta($post_id, '_exclude_store', true);
    23     $store_country = get_post_meta($post_id, 'store_country', true);
     21/**
     22 * @version 1.8.6
     23 * @since 1.x
     24 */
     25function wps_store_id_column_content( $name, $post_id ) {
     26    $exclude_store = wps_get_post_meta( $post_id, '_exclude_store' );
     27    $store_country = wps_get_post_meta( $post_id, 'store_country' );
    2428
    2529    switch ($name) {
     
    3438            <?php endif; ?>
    3539            <?php
    36             do_action('wps_store_column_custom_fields', $post_id);
     40            do_action( 'wps_store_column_custom_fields', $post_id );
    3741        break;
    3842    }
    3943}
    40 add_filter('manage_store_posts_custom_column', 'wps_store_id_column_content', 10, 2);
     44add_filter( 'manage_store_posts_custom_column', 'wps_store_id_column_content', 10, 2 );
    4145
    4246/**
     
    5256 * Metabox Miscellaneous content
    5357 *
     58 * @version 1.8.0
    5459 * @since 1.0.0
    55  * @version 1.8.0
     60 *
     61 * @param WP_Post $post
    5662 */
    5763function wps_store_misc_metabox_content( $post ) {
     
    96102 * Metabox Store content
    97103 *
    98  * @since 1.0.0
    99  */
    100 function wps_store_metabox_details_content($post) {
     104 * @version 1.8.6
     105 * @since 1.x
     106 *
     107 * @param WP_Post $post
     108 */
     109function wps_store_metabox_details_content( $post ) {
    101110    // Display code/markup goes here. Don't forget to include nonces!
    102111    $pid = $post->ID;   
    103     $city = get_post_meta( $pid, 'city', true );
    104     $phone = get_post_meta( $pid, 'phone', true );
    105     $map = get_post_meta( $pid, 'map', true );
    106     $waze = get_post_meta( $pid, 'waze', true );
    107     $description = get_post_meta( $pid, 'description', true );
    108     $address = get_post_meta( $pid, 'address', true );
    109     $store_shipping_cost = get_post_meta( $pid, 'store_shipping_cost', true );
    110 
    111     $store_order_email = get_post_meta( $pid, 'store_order_email', true );
    112     $enable_order_email = get_post_meta( $pid, 'enable_order_email', true );
    113 
    114     if (wps_check_countries_count())
    115         $store_country = get_post_meta( $pid, 'store_country', true );
    116     $store_country = (!empty($store_country)) ? $store_country : wps_get_wc_default_country();
     112    $city = wps_get_post_meta( $pid, 'city' );
     113    $phone = wps_get_post_meta( $pid, 'phone' );
     114    $map = wps_get_post_meta( $pid, 'map' );
     115    $waze = wps_get_post_meta( $pid, 'waze' );
     116    $description = wps_get_post_meta( $pid, 'description' );
     117    $address = wps_get_post_meta( $pid, 'address' );
     118    $store_shipping_cost = wps_get_post_meta( $pid, 'store_shipping_cost' );
     119
     120    $store_order_email = wps_get_post_meta( $pid, 'store_order_email' );
     121    $enable_order_email = wps_get_post_meta( $pid, 'enable_order_email' );
     122    $store_country = '';
     123
     124    if ( wps_check_countries_count() ) {
     125        $store_country = wps_get_post_meta( $pid, 'store_country' );
     126    }
     127    $store_country = !empty( $store_country ) ? $store_country : wps_get_wc_default_country();
     128    $allowed_countries = wps_check_countries_count( false );
    117129
    118130    // Add a nonce field so we can check for it later.
     
    120132    ?>
    121133    <table class="form-table">     
    122         <?php if ($allowed_countries = wps_check_countries_count(false)) : ?>
     134        <?php if ( $allowed_countries ) { ?>
    123135            <tr>
    124136                <th><?php _e('Country', 'wc-pickup-store') ?></th>
     
    126138                    <select name="store_country" class="wc-enhanced-select" id="store-country">
    127139                        <option value="-1"><?= __('Choose a country', 'wc-pickup-store') ?></option>
    128                         <?php foreach ($allowed_countries as $key => $country) : ?>
    129                             <option value="<?= $country['code'] ?>" <?php selected($store_country, $country['code']) ?>><?= $country['name'] ?></option>
    130                         <?php endforeach; ?>
     140                        <?php foreach ( $allowed_countries as $country ) { ?>
     141                            <option value="<?= $country['code'] ?>" <?php selected( $store_country, $country['code'] ) ?>><?= $country['name'] ?></option>
     142                        <?php } ?>
    131143                    </select>
    132144                </td>
    133145            </tr>
    134         <?php else: ?>
     146        <?php } else { ?>
    135147            <input type="hidden" name="store_country" value="<?= $store_country ?>">
    136         <?php endif; ?>
    137 
    138         <?php if (WPS()->costs_per_store == 'yes') : ?>
     148        <?php } ?>
     149
     150        <?php if ( WPS()->costs_per_store == 'yes' ) { ?>
    139151            <tr>
    140152                <th><?php _e('Store shipping cost', 'wc-pickup-store') ?></th>
     
    143155                    <p class="description"><?= __('Add shipping cost for this store.', 'wc-pickup-store') ?></p>
    144156            </tr>
    145         <?php endif; ?>
     157        <?php } ?>
    146158   
    147159        <tr>
     
    162174                <input type="text" name="store_order_email" class="regular-text" value="<?= $store_order_email ?>"><br>
    163175                <label for="enable-order-email">
    164                     <input type="checkbox" id="enable-order-email" name="enable_order_email" class="form-control" <?php checked($enable_order_email, 1) ?> /> <?php _e('Enable order email notification', 'wc-pickup-store') ?>
     176                    <input type="checkbox" id="enable-order-email" name="enable_order_email" class="form-control" <?php checked( $enable_order_email, 1 ) ?> /> <?php _e('Enable order email notification', 'wc-pickup-store') ?>
    165177                </label>
    166178                <p class="description"><?= __('Add email to be notified when this store is selected on an order. Comma separated for multiple email addresses.', 'wc-pickup-store') ?></p>
     
    186198                <?php
    187199                    $settings = array('textarea_name' => 'description', 'editor_height' => 75);
    188                     wp_editor($description, 'description', $settings );
     200                    wp_editor(  $description, 'description', $settings );
    189201                ?>
    190202            </td>
     
    195207                <?php
    196208                    $settings = array('textarea_name' => 'address', 'editor_height' => 75);
    197                     wp_editor($address, 'address', $settings );
     209                    wp_editor( $address, 'address', $settings );
    198210                ?>
    199211            </td>
     
    207219 * Save content
    208220 *
     221 * @version 1.8.0
    209222 * @since 1.0.0
    210  * @version 1.8.0
    211223 */
    212224function wps_store_save_content( $post_id ) {
     
    274286 * Update to disable country filtering
    275287 *
     288 * @version 1.8.2
    276289 * @since 1.6.0
    277  * @version 1.8.2
    278290 */
    279291function wps_check_countries_count($only_validate = true) {
     
    343355 * Notice stores without country
    344356 *
     357 * @version 1.8.5
    345358 * @since 1.5.24
    346  * @version 1.8.5
    347359 */
    348360function wps_store_country_notice() {
     
    374386 * Update stores without Country
    375387 *
     388 * @version 1.8.2
    376389 * @since 1.5.25
    377  * @version 1.8.2
    378390 */
    379391function wps_update_stores_without_country() {
     
    418430 * Check for stores without country
    419431 *
    420  * TODO: Error here
    421  *
     432 * @version 1.8.3
    422433 * @since 1.8.2
    423  * @version 1.8.3
    424434 *
    425435 * @return array Array of stores without country or false if filtering is disabled
  • wc-pickup-store/trunk/includes/integrations/class-vc_stores.php

    r2679602 r3002003  
    33 * Custom VC Element
    44 */
    5 if (class_exists('WPBakeryShortcode')) {
     5if ( class_exists( 'WPBakeryShortcode' ) ) {
    66    class VC_WPS_Store_Customizations extends WPBakeryShortcode {
    77        function __construct() {
     
    136136        }
    137137
    138         public function vc_wps_store_html($atts) {
     138        /**
     139         * WPBakery component for stores
     140         *
     141         * @version 1.8.6
     142         * @since 1.x
     143         */
     144        public function vc_wps_store_html( $atts ) {
    139145            // Params extraction
    140146            extract( $atts );
    141147            $layout = 'layout-list';
    142             $icon_background = (!empty($atts['store_icon_background'])) ? 'style="background: ' . $atts['store_icon_background'] . '"' : '';
    143             $icon_color = (!empty($atts['store_icon_color'])) ? 'style="color: ' . $atts['store_icon_color'] . '"' : '';
    144 
    145             if(!empty($atts['stores_layout']) && !empty($atts['stores_per_row'])) {
     148            $icon_background = !empty( $atts['store_icon_background'] ) ? 'style="background: ' . $atts['store_icon_background'] . '"' : '';
     149            $icon_color = !empty( $atts['store_icon_color'] ) ? 'style="color: ' . $atts['store_icon_color'] . '"' : '';
     150
     151            if ( !empty( $atts['stores_layout'] ) && !empty( $atts['stores_per_row'] ) ) {
    146152                $layout = 'layout-grid col-layout-' . $atts['stores_per_row'];
    147             } elseif(!empty($atts['stores_layout'])) {
     153            } elseif ( !empty( $atts['stores_layout'] ) ) {
    148154                $layout = 'layout-grid';
    149155            }
    150156
    151             $image_size = explode('x', strtolower($atts['store_image_size']));
    152             if(!empty($image_size[1])) {
     157            $image_size = explode( 'x', strtolower( $atts['store_image_size'] ) );
     158            if ( !empty( $image_size[1] ) ) {
    153159                $store_image_size = $image_size;
    154160            } else {
     
    163169            );
    164170
    165             if(!empty($atts['post_ids'])) {
     171            if ( !empty( $atts['post_ids'] ) ) {
    166172                $query_args['orderby'] = 'post__in';
    167                 $query_args['post__in'] = explode(',', $atts['post_ids']);
    168             }
    169 
    170             $template_file = wps_locate_template('wrapper-vc_stores.php');
     173                $query_args['post__in'] = explode( ',', $atts['post_ids'] );
     174            }
     175
     176            $template_file = wps_locate_template( 'wrapper-vc_stores.php' );
    171177            ob_start();
    172             $query = new WP_Query($query_args);
    173             if($query->have_posts() && $template_file) :
     178            $query = new WP_Query( apply_filters( 'wps_store_widget_query_args', $query_args ) );
     179            if ( $query->have_posts() && $template_file ) {
    174180                ?>
    175181                <div class="stores-container <?= $layout ?>">
     
    178184                            // global $post;
    179185                            $store_id = get_the_ID();
    180                             $store_city = sanitize_text_field(wps_get_post_meta($store_id, 'city'));
    181                             $store_direction = (!empty($atts['store_direction'])) ? wp_kses_post(wps_get_post_meta($store_id, 'address')) : '';
    182                             $store_phone = (!empty($atts['store_phone'])) ? sanitize_text_field(wps_get_post_meta($store_id, 'phone')) : '';
    183                             $store_description = (!empty($atts['store_description'])) ? wp_kses_post(wps_get_post_meta($store_id, 'description')) : '';
    184                             $store_waze_link = (!empty($atts['store_waze_link'])) ? esc_url(wps_get_post_meta($store_id, 'waze')) : '';
     186                            $store_city = sanitize_text_field( wps_get_post_meta( $store_id, 'city' ) );
     187                            $store_direction = !empty( $atts['store_direction'] ) ? wp_kses_post( wps_get_post_meta( $store_id, 'address' ) ) : '';
     188                            $store_phone = !empty( $atts['store_phone'] ) ? sanitize_text_field( wps_get_post_meta( $store_id, 'phone' ) ) : '';
     189                            $store_description = !empty( $atts['store_description'] ) ? wp_kses_post( wps_get_post_meta( $store_id, 'description' ) ) : '';
     190                            $store_waze_link = !empty( $atts['store_waze_link'] ) ? esc_url( wps_get_post_meta( $store_id, 'waze' ) ) : '';
    185191                   
    186192                            include $template_file;
     
    191197                </div>
    192198                <?php
    193             endif;
    194 
    195             $html = ob_get_contents();
    196             ob_end_clean();
     199            }
     200
     201            $html = ob_get_clean();
    197202            return $html;
    198203        }
  • wc-pickup-store/trunk/includes/integrations/class-widget-stores.php

    r2679602 r3002003  
    3232    }
    3333
    34     // Creating widget front-end
     34    /**
     35     * Creating widget front-end
     36     *
     37     * @version 1.8.6
     38     * @since 1.x
     39     */
    3540    public function widget( $args, $instance ) {
    3641        $title = apply_filters( 'widget_title', $instance['title'] );
    37         $per_page = (!empty($instance['per_page'])) ? $instance['per_page'] : 1;
    38         $image_size = explode('x', strtolower($instance['store_image_size']));
     42        $per_page = !empty( $instance['per_page'] ) ? $instance['per_page'] : 1;
     43        $image_size = explode( 'x', strtolower( $instance['store_image_size'] ) );
    3944        $attr = array();
     45        $bootstrap_version = WPS()->bootstrap_version;
    4046
    41         foreach ($this->wps_widget_fields(array('title', 'per_page', 'image_size')) as $key => $field) {
    42             $attr[$field] = (!empty($instance[$field])) ? $instance[$field] : '';
     47        foreach ( $this->wps_widget_fields( array( 'title', 'per_page', 'image_size' ) ) as $key => $field ) {
     48            $attr[$field] = !empty($instance[$field] ) ? $instance[$field] : '';
    4349        }
    4450
    45         if(!empty($image_size[1])) {
     51        if ( !empty( $image_size[1] ) ) {
    4652            $store_image_size = $image_size;
    4753        } else {
     
    5056
    5157        $classes = array(
    52             '1' => ( WPS()->bootstrap_version == 'version_3' ) ? 'col-xs-12' : 'col-12',
    53             '2' => ( WPS()->bootstrap_version == 'version_3' ) ? 'col-xs-6' : 'col-6',
    54             '3' => ( WPS()->bootstrap_version == 'version_3' ) ? 'col-sm-4 col-xs-6' : 'col-sm-4 col-6',
    55             '4' => ( WPS()->bootstrap_version == 'version_3' ) ? 'col-sm-3 col-xs-6' : 'col-sm-3 col-6'
     58            '1' => ( $bootstrap_version == 'version_3' ) ? 'col-xs-12' : 'col-12',
     59            '2' => ( $bootstrap_version == 'version_3' ) ? 'col-xs-6' : 'col-6',
     60            '3' => ( $bootstrap_version == 'version_3' ) ? 'col-sm-4 col-xs-6' : 'col-sm-4 col-6',
     61            '4' => ( $bootstrap_version == 'version_3' ) ? 'col-sm-3 col-xs-6' : 'col-sm-3 col-6'
    5662        );
    5763
     
    6167        );
    6268
    63         if(!empty($attr['post_ids'])) {
     69        if ( !empty( $attr['post_ids'] ) ) {
    6470            $query_args['orderby'] = 'post__in';
    65             $query_args['post__in'] = explode(',', $attr['post_ids']);
     71            $query_args['post__in'] = explode( ',', $attr['post_ids'] );
    6672        }
    6773
    6874        // before and after widget arguments are defined by themes
    6975        echo $args['before_widget'];
    70         if ( ! empty( $title ) )
     76        if ( ! empty( $title ) ) {
    7177            echo $args['before_title'] . $title . $args['after_title'];
     78        }
    7279
    73         $template_file = wps_locate_template('wrapper-store.php', false);
     80        $template_file = wps_locate_template( 'wrapper-store.php', false );
    7481
    75         if ($template_file) {
     82        if ( $template_file ) {
    7683            echo '<div class="row">';
    77                 $query = new WP_Query($query_args);
    78                 if($query->have_posts() ) :
     84                $query = new WP_Query( apply_filters( 'wps_store_widget_query_args', $query_args ) );
     85                if ( $query->have_posts() ) {
    7986                    while ( $query->have_posts() ) : $query->the_post();
    8087                        global $post;
     
    9299                    endwhile;
    93100                    wp_reset_postdata();
    94                 endif;
     101                }
    95102            echo '</div>';
    96103        }
    97 
    98104
    99105        echo $args['after_widget'];
  • wc-pickup-store/trunk/includes/wps-functions.php

    r2904913 r3002003  
    146146/**
    147147 * Remove cart shipping label
     148 *
     149 * @version 1.7.0
    148150 * @since 1.5.24
    149  * @version 1.7.0
    150151 */
    151152function wps_shipping_method_label( $label, $method ) {
     
    177178 * Get chosen shipping method
    178179 *
     180 * @version 1.8.2
    179181 * @since 1.5.x
    180  * @version 1.8.2
    181182 *
    182183 * @return array Chosen shipping methods or empty array
     
    236237/**
    237238 * Add store shipping cost to cart amount
     239 *
     240 * @version 1.7.0
    238241 * @since 1.5.21
    239  * @version 1.7.0
    240242 */
    241243function wps_add_store_shipping_to_cart( $cart ) {
     
    292294/**
    293295 * Get email address from store
     296 *
     297 * @version 1.8.6
    294298 * @since 1.5.24
    295  * @version 1.7.1
    296  * @param object $order
    297  * @param int $store_id Optional, if empty gets the store_id from order
    298  * @param bool $get_first_email Check true to get the first email address added to the store
     299 *
     300 * @param WC_Order $order
     301 * @param int $store_id             Optional, if empty gets the store_id from order
     302 * @param bool $get_first_email     Check true to get the first email address added to the store
     303 *
    299304 * @return mixed First email address, all email addresses or false if email address field is empty
    300305 */
    301306function wps_get_email_address( $order, $store_id = 0, $get_first_email = false ) {
    302     $order_id = $order->get_id();
    303 
    304307    if ( $store_id == 0 ) {
    305         $store_name = wps_get_post_meta($order_id, '_shipping_pickup_stores'); // Get store title for this order
     308        $store_name = $order->get_meta( '_shipping_pickup_stores' ); // Get store title for this order
    306309        $store_id = wps_get_store_id_by_name( $store_name );
    307310    }
    308311
    309     $store_order_email = wps_get_post_meta($store_id, 'store_order_email');
    310     $enable_order_email = wps_get_post_meta($store_id, 'enable_order_email');
     312    $store_order_email = wps_get_post_meta( $store_id, 'store_order_email' );
     313    $enable_order_email = wps_get_post_meta( $store_id, 'enable_order_email' );
    311314
    312315    if ( !empty( $store_order_email ) ) {
     
    329332/**
    330333 * Get all stores or store_id with its custom fields
     334 *
     335 * @version 1.7.1
    331336 * @since 1.5.22
    332  * @version 1.7.1
     337 *
    333338 * @param int $store_id Optional
     339 *
    334340 * @return array Key value array with store(s) data
    335341 */
     
    378384/**
    379385 * Get WPS template
     386 *
     387 * @version 1.8.6
    380388 * @since 1.5.22
    381389 */
    382 function wps_locate_template($template_name) {
    383     $template_name = ltrim($template_name, '/');
    384     $template_file = trailingslashit(plugin_dir_path(__DIR__)) . 'templates/' . $template_name;
    385    
    386     if (locate_template('template-parts/' . $template_name)) {
    387         $template_file = locate_template('template-parts/' . $template_name, false);
    388     }
    389 
    390     if (file_exists($template_file)) {
     390function wps_locate_template( $template_name ) {
     391    $template_name = ltrim( $template_name, '/' );
     392    $template_file = trailingslashit( plugin_dir_path( __DIR__ ) ) . 'templates/' . $template_name;
     393   
     394    if ( locate_template( 'template-parts/' . $template_name ) ) {
     395        $template_file = locate_template( 'template-parts/' . $template_name, false );
     396    }
     397
     398    if ( file_exists( $template_file ) ) {
    391399        return $template_file;
    392     } else {
    393         return false;
    394     }
     400    }
     401   
     402    return false;
    395403}
    396404
    397405/**
    398406 * Custom function to return post meta using a filter
    399  * @since 1.5.24
    400  */
    401 function wps_get_post_meta($post_id, $custom_field) {
    402     return apply_filters('wps_get_post_meta', get_post_meta($post_id, $custom_field, true), $post_id, $custom_field);
     407 *
     408 * @version 1.5.24
     409 */
     410function wps_get_post_meta( $post_id, $custom_field ) {
     411    return apply_filters( 'wps_get_post_meta', get_post_meta( $post_id, $custom_field, true ), $post_id, $custom_field );
    403412}
    404413           
    405414/**
    406415 * Set message on cart page
     416 *
    407417 * @version 1.6.1
    408418 */
     
    427437 * Get store ID by store name
    428438 *
     439 * @version 1.8.5
    429440 * @since 1.6.3
    430  * @version 1.8.5
    431441 *
    432442 * @param string $store_name
     
    478488/**
    479489 * Get tax status configured on settings page
     490 *
    480491 * @version 1.7.0
     492 *
    481493 * @return mixed Chosen tax status type or false if calc_taxes option is disabled
    482494 */
     
    491503/**
    492504 * Get tax status
     505 *
    493506 * @version 1.7.0
    494507 */
     
    515528/**
    516529 * Formatting shipping address for wc_pickup_store method
    517  * @version 1.7.1
     530 *
     531 * @version 1.8.6
     532 * @since 1.7.1
     533 *
    518534 * @return string Address with store information
    519535 */
    520536function wps_wc_order_get_formatted_shipping_address( $address, $raw_address, $order ) {
    521     $order_id = $order->get_id();
    522     $store_name = wps_get_post_meta( $order_id, '_shipping_pickup_stores' ); // Get store title for this order
     537    $store_name = $order->get_meta( '_shipping_pickup_stores' ); // Get store title for this order
    523538    $store_id = wps_get_store_id_by_name( $store_name );
    524539    $store = wps_stores_fields( $store_id );
     
    526541    if ( $store_id != 0 && $order->has_shipping_method( 'wc_pickup_store' ) ) {
    527542        $address = WC()->countries->get_formatted_address( array(
    528             'company' => sprintf( '%1$s: %2$s', apply_filters('wps_store_checkout_label', WPS()->title), $store_name ),
     543            'company' => sprintf( '%1$s: %2$s', apply_filters( 'wps_store_checkout_label', WPS()->title), $store_name ),
    529544            'address_1' => isset( $store['address'] ) ? wp_strip_all_tags( $store['address'] ) : '',
    530545            'city' => $store['city'] ?? '',
     
    535550       
    536551        if ( $store_email = wps_get_email_address( $order, $store_id, true ) ) {
    537             $address .= '<br>' . sprintf( '%1$s: %2$s', __('Store email', 'wc-pickup-store'), $store_email );
     552            $address .= '<br>' . sprintf( '%1$s: %2$s', __( 'Store email', 'wc-pickup-store' ), $store_email );
    538553        }
    539554    }
  • wc-pickup-store/trunk/languages/wc-pickup-store.pot

    r2608382 r3002003  
    1 # Copyright (C) 2021 Keylor Mendoza A.
     1# Copyright (C) 2023 Keylor Mendoza A.
    22# This file is distributed under the same license as the WC Pickup Store plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WC Pickup Store 1.7.2\n"
     5"Project-Id-Version: WC Pickup Store 1.8.6\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-pickup-store\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2021-10-03T05:13:04+00:00\n"
     12"POT-Creation-Date: 2023-11-27T05:27:58+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    1818#: includes/admin/wps-admin.php:14
    1919#: includes/integrations/class-vc_stores.php:22
    20 #: includes/integrations/class-widget-stores.php:13
     20#: includes/integrations/class-widget-stores.php:17
    2121msgid "WC Pickup Store"
    2222msgstr ""
     
    3939
    4040#: includes/admin/wps-admin.php:7
     41#: includes/admin/wps-settings.php:30
    4142#: includes/wps-functions.php:42
    4243msgid "Select a store"
     
    4849
    4950#: includes/admin/wps-admin.php:12
    50 #: includes/admin/wps-settings.php:33
    51 #: includes/admin/wps-settings.php:162
     51#: includes/admin/wps-settings.php:40
     52#: includes/admin/wps-settings.php:169
    5253msgid "None"
    5354msgstr ""
    5455
    5556#: includes/admin/wps-admin.php:17
    56 #: includes/class-wps-init.php:100
     57#: includes/class-wps-init.php:135
    5758msgid "Default store"
    5859msgstr ""
    5960
    6061#: includes/admin/wps-admin.php:28
    61 #: includes/cpt-store.php:357
    62 #: includes/cpt-store.php:372
     62#: includes/cpt-store.php:463
     63#: includes/cpt-store.php:478
    6364msgid "Stores"
    6465msgstr ""
     
    6869msgstr ""
    6970
    70 #: includes/admin/wps-admin.php:109
    71 #: includes/admin/wps-admin.php:123
     71#: includes/admin/wps-admin.php:115
     72#: includes/admin/wps-admin.php:129
    7273#: includes/integrations/class-vc_stores.php:33
    7374#: includes/integrations/class-vc_stores.php:41
     
    7980msgstr ""
    8081
    81 #: includes/admin/wps-admin.php:135
     82#: includes/admin/wps-admin.php:144
    8283msgid "You must either choose a store or use other shipping method"
    8384msgstr ""
    8485
    85 #: includes/admin/wps-admin.php:157
     86#: includes/admin/wps-admin.php:170
    8687#: includes/admin/wps-settings.php:23
    87 #: includes/class-wps-init.php:128
     88#: includes/class-wps-init.php:171
    8889msgid "Pickup Store"
    8990msgstr ""
    9091
    91 #: includes/admin/wps-admin.php:185
     92#: includes/admin/wps-admin.php:198
    9293msgid "There are not available stores. Please choose another shipping method."
    9394msgstr ""
     
    99100#: includes/admin/wps-settings.php:6
    100101#: includes/admin/wps-settings.php:14
    101 #: includes/admin/wps-settings.php:50
     102#: includes/admin/wps-settings.php:57
    102103msgid "Enable"
    103104msgstr ""
     
    124125
    125126#: includes/admin/wps-settings.php:27
     127msgid "Select first option text"
     128msgstr ""
     129
     130#: includes/admin/wps-settings.php:29
     131msgid "Text to be displayed as first option of the stores dropdown"
     132msgstr ""
     133
     134#: includes/admin/wps-settings.php:34
    126135msgid "Shipping Costs Type"
    127136msgstr ""
    128137
    129 #: includes/admin/wps-settings.php:30
     138#: includes/admin/wps-settings.php:37
    130139msgid "Choose a shipping costs type to calculate Pick up store costs. Use None to deactivate shipping store costs"
    131140msgstr ""
    132141
    133 #: includes/admin/wps-settings.php:34
     142#: includes/admin/wps-settings.php:41
    134143msgid "Flat Rate"
    135144msgstr ""
    136145
    137 #: includes/admin/wps-settings.php:35
     146#: includes/admin/wps-settings.php:42
    138147msgid "Percentage"
    139148msgstr ""
    140149
    141 #: includes/admin/wps-settings.php:40
     150#: includes/admin/wps-settings.php:47
    142151msgid "Shipping Costs"
    143152msgstr ""
    144153
    145 #: includes/admin/wps-settings.php:42
     154#: includes/admin/wps-settings.php:49
    146155msgid "Adds main shipping cost to store pickup"
    147156msgstr ""
    148157
    149 #: includes/admin/wps-settings.php:48
     158#: includes/admin/wps-settings.php:55
    150159msgid "Enable costs per store"
    151160msgstr ""
    152161
    153 #: includes/admin/wps-settings.php:52
     162#: includes/admin/wps-settings.php:59
    154163msgid "Allows to add shipping costs by store that will override the main shipping cost."
    155164msgstr ""
    156165
    157 #: includes/admin/wps-settings.php:56
     166#: includes/admin/wps-settings.php:63
    158167msgid "Order Stores by"
    159168msgstr ""
    160169
    161 #: includes/admin/wps-settings.php:59
    162 #: includes/admin/wps-settings.php:73
     170#: includes/admin/wps-settings.php:66
     171#: includes/admin/wps-settings.php:80
    163172msgid "Choose what order the stores will be shown"
    164173msgstr ""
    165174
    166 #: includes/admin/wps-settings.php:70
     175#: includes/admin/wps-settings.php:77
    167176msgid "Order"
    168177msgstr ""
    169178
    170 #: includes/admin/wps-settings.php:83
     179#: includes/admin/wps-settings.php:90
    171180msgid "Choose a default store to Checkout"
    172181msgstr ""
    173182
    174 #: includes/admin/wps-settings.php:87
     183#: includes/admin/wps-settings.php:94
    175184msgid "Checkout notification"
    176185msgstr ""
    177186
    178 #: includes/admin/wps-settings.php:89
     187#: includes/admin/wps-settings.php:96
    179188msgid "Message that appears next to shipping options on the Checkout page"
    180189msgstr ""
    181190
    182 #: includes/admin/wps-settings.php:94
     191#: includes/admin/wps-settings.php:101
    183192msgid "Hide store details on Checkout"
    184193msgstr ""
    185194
    186 #: includes/admin/wps-settings.php:96
     195#: includes/admin/wps-settings.php:103
    187196msgid "Hide"
    188197msgstr ""
    189198
    190 #: includes/admin/wps-settings.php:98
     199#: includes/admin/wps-settings.php:105
    191200msgid "Hide selected store details on the Checkout page."
    192201msgstr ""
    193202
    194 #: includes/admin/wps-settings.php:102
     203#: includes/admin/wps-settings.php:109
    195204msgid "Disable store filtering by Country"
    196205msgstr ""
    197206
    198 #: includes/admin/wps-settings.php:104
     207#: includes/admin/wps-settings.php:111
     208#: includes/admin/wps-settings.php:120
     209#: includes/admin/wps-settings.php:132
     210#: includes/admin/wps-settings.php:143
     211#: includes/admin/wps-settings.php:151
     212msgid "Disable"
     213msgstr ""
     214
    199215#: includes/admin/wps-settings.php:113
     216msgid "By default, stores will be filtered by country on the Checkout."
     217msgstr ""
     218
     219#: includes/admin/wps-settings.php:121
     220#: includes/admin/wps-settings.php:122
     221#: includes/admin/wps-settings.php:133
     222#: includes/admin/wps-settings.php:134
     223msgid "Use version %s"
     224msgstr ""
     225
    200226#: includes/admin/wps-settings.php:125
    201 #: includes/admin/wps-settings.php:136
    202 #: includes/admin/wps-settings.php:144
    203 msgid "Disable"
    204 msgstr ""
    205 
    206 #: includes/admin/wps-settings.php:106
    207 msgid "By default, stores will be filtered by country on the Checkout."
    208 msgstr ""
    209 
    210 #: includes/admin/wps-settings.php:114
    211 #: includes/admin/wps-settings.php:115
    212 #: includes/admin/wps-settings.php:126
    213 #: includes/admin/wps-settings.php:127
    214 msgid "Use version %s"
    215 msgstr ""
    216 
    217 #: includes/admin/wps-settings.php:118
    218227msgid "Choose for external Bootstrap library version. Use Disable to disable the library."
    219228msgstr ""
    220229
    221 #: includes/admin/wps-settings.php:130
     230#: includes/admin/wps-settings.php:137
    222231msgid "Choose for external Font Awesome library version. Use Disable to disable the library."
    223232msgstr ""
    224233
    225 #: includes/admin/wps-settings.php:134
     234#: includes/admin/wps-settings.php:141
    226235msgid "Disable local css"
    227236msgstr ""
    228237
    229 #: includes/admin/wps-settings.php:138
     238#: includes/admin/wps-settings.php:145
    230239msgid "Disable WC Pickup Store css library."
    231240msgstr ""
    232241
    233 #: includes/admin/wps-settings.php:142
     242#: includes/admin/wps-settings.php:149
    234243msgid "Disable select2 on Checkout"
    235244msgstr ""
    236245
    237 #: includes/admin/wps-settings.php:146
     246#: includes/admin/wps-settings.php:153
    238247msgid "Disable select2 library for stores dropdown on Checkout page."
    239248msgstr ""
    240249
    241 #: includes/admin/wps-settings.php:154
     250#: includes/admin/wps-settings.php:161
    242251msgid "Configure tax options"
    243252msgstr ""
    244253
    245 #: includes/admin/wps-settings.php:156
     254#: includes/admin/wps-settings.php:163
    246255msgid "Configure the usage for taxes based on shipping method or per stores"
    247256msgstr ""
    248257
    249 #: includes/admin/wps-settings.php:159
     258#: includes/admin/wps-settings.php:166
    250259msgid "Tax status"
    251260msgstr ""
    252261
    253 #: includes/admin/wps-settings.php:163
     262#: includes/admin/wps-settings.php:170
    254263msgid "Taxable"
    255264msgstr ""
    256265
    257 #: includes/admin/wps-settings.php:164
     266#: includes/admin/wps-settings.php:171
    258267msgid "Taxable per store"
    259268msgstr ""
    260269
    261 #: includes/admin/wps-settings.php:167
     270#: includes/admin/wps-settings.php:174
    262271msgid "Use Taxable to enable tax calculation for the shipping method. Use Taxable per store to enable tax calculation based on store tax configuration. Use none to disable tax calculations. Avoid using Taxable per store when costs per store are disabled."
    263272msgstr ""
    264273
    265 #: includes/class-wps-init.php:27
     274#: includes/class-wps-init.php:51
    266275msgid "Lets users to choose a store to pick up their products"
    267276msgstr ""
    268277
    269 #: includes/class-wps-init.php:103
     278#: includes/class-wps-init.php:138
    270279msgid "Find this option in <a href=\"%s\" target=\"_blank\">the Customizer</a>"
    271280msgstr ""
     
    275284msgstr ""
    276285
    277 #: includes/cpt-store.php:31
     286#: includes/cpt-store.php:35
    278287msgid "Exclude in Checkout?"
    279288msgstr ""
    280289
    281 #: includes/cpt-store.php:31
     290#: includes/cpt-store.php:35
    282291msgid "Yes"
    283292msgstr ""
    284293
    285 #: includes/cpt-store.php:31
     294#: includes/cpt-store.php:35
    286295msgid "No"
    287296msgstr ""
    288297
    289 #: includes/cpt-store.php:33
     298#: includes/cpt-store.php:37
    290299msgid "Country:"
    291300msgstr ""
    292301
    293 #: includes/cpt-store.php:46
     302#: includes/cpt-store.php:50
    294303msgid "Miscellaneous"
    295304msgstr ""
    296305
    297 #: includes/cpt-store.php:47
     306#: includes/cpt-store.php:51
    298307msgid "Store Fields"
    299308msgstr ""
    300309
    301 #: includes/cpt-store.php:67
     310#: includes/cpt-store.php:79
    302311msgid "Exclude store in checkout."
    303312msgstr ""
    304313
    305 #: includes/cpt-store.php:75
     314#: includes/cpt-store.php:87
    306315msgid "Set this store as taxable."
    307316msgstr ""
    308317
    309 #: includes/cpt-store.php:111
     318#: includes/cpt-store.php:136
    310319msgid "Country"
    311320msgstr ""
    312321
    313 #: includes/cpt-store.php:114
     322#: includes/cpt-store.php:139
    314323msgid "Choose a country"
    315324msgstr ""
    316325
    317 #: includes/cpt-store.php:127
     326#: includes/cpt-store.php:152
    318327msgid "Store shipping cost"
    319328msgstr ""
    320329
    321 #: includes/cpt-store.php:130
     330#: includes/cpt-store.php:155
    322331msgid "Add shipping cost for this store."
    323332msgstr ""
    324333
    325 #: includes/cpt-store.php:135
     334#: includes/cpt-store.php:160
    326335#: templates/selected-store-details.php:4
    327336msgid "City"
    328337msgstr ""
    329338
    330 #: includes/cpt-store.php:141
     339#: includes/cpt-store.php:166
    331340#: templates/selected-store-details.php:7
    332341msgid "Phone"
    333342msgstr ""
    334343
    335 #: includes/cpt-store.php:147
     344#: includes/cpt-store.php:172
    336345msgid "Order Email Notification"
    337346msgstr ""
    338347
    339 #: includes/cpt-store.php:151
     348#: includes/cpt-store.php:176
    340349msgid "Enable order email notification"
    341350msgstr ""
    342351
    343 #: includes/cpt-store.php:153
     352#: includes/cpt-store.php:178
    344353msgid "Add email to be notified when this store is selected on an order. Comma separated for multiple email addresses."
    345354msgstr ""
    346355
    347 #: includes/cpt-store.php:160
     356#: includes/cpt-store.php:185
    348357msgid "Waze link"
    349358msgstr ""
    350359
    351 #: includes/cpt-store.php:164
     360#: includes/cpt-store.php:189
    352361msgid "Map URL"
    353362msgstr ""
    354363
    355 #: includes/cpt-store.php:167
     364#: includes/cpt-store.php:192
    356365msgid "Add map URL to be embedded. No iframe tag required."
    357366msgstr ""
    358367
    359 #: includes/cpt-store.php:171
     368#: includes/cpt-store.php:196
    360369msgid "Short description"
    361370msgstr ""
    362371
    363 #: includes/cpt-store.php:180
     372#: includes/cpt-store.php:205
    364373#: templates/selected-store-details.php:10
    365374msgid "Address"
    366375msgstr ""
    367376
    368 #: includes/cpt-store.php:339
     377#: includes/cpt-store.php:370
     378msgid "Since version %1$s, a new Country validation was added to %2$s. Please, update stores without country manually or use the default country %3$s %4$shere%5$s."
     379msgstr ""
     380
     381#: includes/cpt-store.php:404
    369382msgid "Since version %1$s, a new Country validation was added to %2$s and all stores have been updated."
    370383msgstr ""
    371384
    372 #: includes/cpt-store.php:355
     385#: includes/cpt-store.php:461
    373386msgctxt "Post Type General Name"
    374387msgid "Stores"
    375388msgstr ""
    376389
    377 #: includes/cpt-store.php:356
     390#: includes/cpt-store.php:462
    378391msgctxt "Post Type Singular Name"
    379392msgid "Store"
    380393msgstr ""
    381394
    382 #: includes/cpt-store.php:358
    383 #: includes/cpt-store.php:371
     395#: includes/cpt-store.php:464
     396#: includes/cpt-store.php:477
    384397msgid "Store"
    385398msgstr ""
    386399
    387 #: includes/cpt-store.php:359
     400#: includes/cpt-store.php:465
    388401msgid "Store Archives"
    389402msgstr ""
    390403
    391 #: includes/cpt-store.php:360
     404#: includes/cpt-store.php:466
    392405msgid "All Stores"
    393406msgstr ""
    394407
    395 #: includes/cpt-store.php:361
    396 #: includes/cpt-store.php:362
     408#: includes/cpt-store.php:467
     409#: includes/cpt-store.php:468
    397410msgid "Add New Store"
    398411msgstr ""
    399412
    400 #: includes/cpt-store.php:363
     413#: includes/cpt-store.php:469
    401414msgid "New Store"
    402415msgstr ""
    403416
    404 #: includes/cpt-store.php:364
     417#: includes/cpt-store.php:470
    405418msgid "Edit Store"
    406419msgstr ""
    407420
    408 #: includes/cpt-store.php:365
     421#: includes/cpt-store.php:471
    409422msgid "Update Store"
    410423msgstr ""
    411424
    412 #: includes/cpt-store.php:366
     425#: includes/cpt-store.php:472
    413426msgid "View Store"
    414427msgstr ""
    415428
    416 #: includes/cpt-store.php:367
     429#: includes/cpt-store.php:473
    417430msgid "View Stores"
    418431msgstr ""
    419432
    420 #: includes/cpt-store.php:368
     433#: includes/cpt-store.php:474
    421434msgid "Search Store"
    422435msgstr ""
     
    431444
    432445#: includes/integrations/class-vc_stores.php:30
    433 #: includes/integrations/class-widget-stores.php:110
     446#: includes/integrations/class-widget-stores.php:120
    434447msgid "Stores to show"
    435448msgstr ""
    436449
    437450#: includes/integrations/class-vc_stores.php:34
    438 #: includes/integrations/class-widget-stores.php:112
     451#: includes/integrations/class-widget-stores.php:122
    439452msgid "Set -1 to show all stores."
    440453msgstr ""
    441454
    442455#: includes/integrations/class-vc_stores.php:38
    443 #: includes/integrations/class-widget-stores.php:115
     456#: includes/integrations/class-widget-stores.php:125
    444457msgid "Set posts IDs"
    445458msgstr ""
    446459
    447460#: includes/integrations/class-vc_stores.php:42
    448 #: includes/integrations/class-widget-stores.php:117
     461#: includes/integrations/class-widget-stores.php:127
    449462msgid "Add post IDs to show followed by a comma. Ex. 01,05."
    450463msgstr ""
     
    467480
    468481#: includes/integrations/class-vc_stores.php:68
    469 #: includes/integrations/class-widget-stores.php:120
     482#: includes/integrations/class-widget-stores.php:130
    470483msgid "Show image?"
    471484msgstr ""
    472485
    473486#: includes/integrations/class-vc_stores.php:75
    474 #: includes/integrations/class-widget-stores.php:125
     487#: includes/integrations/class-widget-stores.php:135
    475488msgid "Image size"
    476489msgstr ""
    477490
    478491#: includes/integrations/class-vc_stores.php:84
    479 #: includes/integrations/class-widget-stores.php:141
     492#: includes/integrations/class-widget-stores.php:151
    480493msgid "Show store name?"
    481494msgstr ""
     
    486499#: includes/integrations/class-vc_stores.php:108
    487500#: includes/integrations/class-vc_stores.php:115
    488 #: includes/integrations/class-widget-stores.php:139
     501#: includes/integrations/class-widget-stores.php:149
    489502msgid "Fields"
    490503msgstr ""
    491504
    492505#: includes/integrations/class-vc_stores.php:91
    493 #: includes/integrations/class-widget-stores.php:151
     506#: includes/integrations/class-widget-stores.php:161
    494507msgid "Show direction?"
    495508msgstr ""
    496509
    497510#: includes/integrations/class-vc_stores.php:98
    498 #: includes/integrations/class-widget-stores.php:156
     511#: includes/integrations/class-widget-stores.php:166
    499512msgid "Show phone?"
    500513msgstr ""
    501514
    502515#: includes/integrations/class-vc_stores.php:105
    503 #: includes/integrations/class-widget-stores.php:161
     516#: includes/integrations/class-widget-stores.php:171
    504517msgid "Show description?"
    505518msgstr ""
     
    521534msgstr ""
    522535
    523 #: includes/integrations/class-widget-stores.php:15
     536#: includes/integrations/class-widget-stores.php:19
    524537msgid "Shows store details in a widget section"
    525538msgstr ""
    526539
    527 #: includes/integrations/class-widget-stores.php:106
     540#: includes/integrations/class-widget-stores.php:116
    528541msgid "Title"
    529542msgstr ""
    530543
    531 #: includes/integrations/class-widget-stores.php:130
     544#: includes/integrations/class-widget-stores.php:140
    532545msgid "Show in columns?"
    533546msgstr ""
    534547
    535 #: includes/integrations/class-widget-stores.php:146
     548#: includes/integrations/class-widget-stores.php:156
    536549msgid "Show city?"
    537550msgstr ""
    538551
    539 #: includes/integrations/class-widget-stores.php:166
     552#: includes/integrations/class-widget-stores.php:176
    540553msgid "Show waze?"
    541554msgstr ""
    542555
    543 #: includes/wps-functions.php:260
     556#: includes/wps-functions.php:267
    544557msgid "Ship to %s"
    545558msgstr ""
    546559
    547 #: includes/wps-functions.php:406
     560#: includes/wps-functions.php:421
    548561msgid "Choose a store for picking up your order on the Checkout page."
    549562msgstr ""
    550563
    551 #: includes/wps-functions.php:496
     564#: includes/wps-functions.php:552
    552565msgid "Store email"
    553566msgstr ""
    554567
    555 #: wc-pickup-store.php:47
     568#: wc-pickup-store.php:54
    556569msgid "%1$s requires %2$sWooCommerce%3$s to be active."
    557570msgstr ""
    558 
    559 #: wc-pickup-store.php:72
    560 msgid "Since version %1$s, a new Country validation was added to %2$s. Please, update stores without country manually or use the default country %3$s %4$shere%5$s."
    561 msgstr ""
  • wc-pickup-store/trunk/readme.txt

    r2904913 r3002003  
    44Tags: ecommerce, e-commerce, store, local pickup, store pickup, woocommerce, local shipping, store post type, recoger en tienda
    55Requires at least: 4.7
    6 Tested up to: 6.2.0
    7 Stable tag: 1.8.5
     6Tested up to: 6.4.1
     7Stable tag: 1.8.6
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    122122
    123123== Changelog ==
     124= 1.8.6 =
     125* Update: Check for compatibility with WC HPOS in wps_show_store_in_admin, wc_reordering_order_item_totals, wps_get_email_address, wps_wc_order_get_formatted_shipping_address and wps_store_save_order_meta
     126* Improvement: Action woocommerce_checkout_update_order_meta replaced by woocommerce_checkout_create_order in wps_store_save_order_meta
     127* Update: Replace get_post_meta with native wps_get_post_meta in wps_store_id_column_content and wps_store_metabox_details_content
     128* Review: Code review in wps_locate_template
     129* New: Filter wps_store_widget_query_args for all the query args in widget display in class-widget-stores.php
     130* New: Filter wps_store_widget_query_args for all the query args in widget display for WPBakery in class-vc_stores.php
     131* Update: Check for compatibility WC & WP
     132
    124133= 1.8.5 =
    125134* Update: Check for compatibility with WP y WC
  • wc-pickup-store/trunk/wc-pickup-store.php

    r2904913 r3002003  
    44 * Plugin URI: https://www.keylormendoza.com/plugins/wc-pickup-store/
    55 * Description: Allows you to set up a custom post type for stores available to use it as shipping method Local pickup in WooCommerce. It also allows your clients to choose an store on the Checkout page and also adds the store fields to the order details and email.
    6  * Version: 1.8.5
     6 * Version: 1.8.6
    77 * Requires at least: 4.7
    8  * Tested up to: 6.2
     8 * Tested up to: 6.4.1
    99 * WC requires at least: 3.0
    10  * WC tested up to: 7.6.1
     10 * WC tested up to: 8.3.1
    1111 * Author: Keylor Mendoza A.
    1212 * Author URI: https://www.keylormendoza.com
     
    2222
    2323if ( !defined( 'WPS_PLUGIN_VERSION' ) ) {
    24     define( 'WPS_PLUGIN_VERSION', '1.8.5' );
     24    define( 'WPS_PLUGIN_VERSION', '1.8.6' );
    2525}
    2626
     
    3636 * Admin Notices
    3737 *
     38 * @version 1.8.2
    3839 * @since 1.0.0
    39  * @version 1.8.2
    4040 */
    4141if ( ! in_array( 'woocommerce/woocommerce.php', get_option( 'active_plugins' ) ) ) {
     
    6666
    6767/**
     68 * WC HPOS Compatibility check
     69 *
     70 * @version 1.8.6
     71 */
     72add_action( 'before_woocommerce_init', function() {
     73    if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     74        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     75    }
     76} );
     77
     78/**
    6879 * Plugin files
    6980 */
Note: See TracChangeset for help on using the changeset viewer.