Plugin Directory

Changeset 2820735


Ignore:
Timestamp:
11/18/2022 09:03:19 PM (3 years ago)
Author:
setaryapp
Message:

Update to version 0.4.0 from GitHub

Location:
setary
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • setary/tags/0.4.0/README.md

    r2802527 r2820735  
    33Tested up to: 6.0.2
    44Requires PHP: 5.6
    5 Stable tag: 0.3.0
     5Stable tag: 0.4.0
    66License: MIT
    77License URI: https://opensource.org/licenses/MIT
     
    5454== Changelog ==
    5555
     56= v0.4.0 (2022-11-18) =
     57* [new] Enabled sale date to/from columns
     58
    5659= v0.3.0 (2022-10-06) =
    5760* [new] Ability to [manage product images](https://setary.com/docs/manage-product-images/?utm_source=setary&utm_medium=changelog).
  • setary/tags/0.4.0/inc/class-products-with-variations.php

    r2795354 r2820735  
    9595            16 => 'regular_price',
    9696            17 => 'sale_price',
    97             // 18 => 'date_on_sale_from',
    98             // 19 => 'date_on_sale_from_gmt',
    99             // 20 => 'date_on_sale_to',
    100             // 21 => 'date_on_sale_to_gmt',
     97            18 => 'date_on_sale_from',
     98            19 => 'date_on_sale_from_gmt',
     99            20 => 'date_on_sale_to',
     100            21 => 'date_on_sale_to_gmt',
    101101            // 22 => 'price_html',
    102102            23 => 'on_sale',
     
    164164        $item['formatted_categories'] = $this->format_categories( $item );
    165165        $item['formatted_images']     = $this->format_images( $item );
     166        $item['date_on_sale_from']    = $this->format_date( $item['date_on_sale_from'] );
     167        $item['date_on_sale_to']      = $this->format_date( $item['date_on_sale_to'] );
    166168
    167169        return $item;
     
    304306        return implode( ' | ', $categories );
    305307    }
     308
     309    /**
     310     * Format date string.
     311     *
     312     * @param string $date Date.
     313     *
     314     * @return string
     315     */
     316    public function format_date( $date ) {
     317        if ( empty( $date ) ) {
     318            return $date;
     319        }
     320
     321        $date_parts = explode( 'T', $date );
     322
     323        return $date_parts[0];
     324    }
    306325}
  • setary/tags/0.4.0/setary.php

    r2795354 r2820735  
    1010 * Author:            Setary
    1111 *
    12  * Version:           0.3.0
     12 * Version:           0.4.0
    1313 * Requires at least: 5.7
    1414 * Tested up to:      6.0.2
     
    2323define( 'SETARY_PATH', \plugin_dir_path( __FILE__ ) );
    2424define( 'SETARY_URL', \plugins_url( '/', __FILE__ ) );
    25 define( 'SETARY_VERSION', '0.3.0' );
     25define( 'SETARY_VERSION', '0.4.0' );
    2626define( 'SETARY_SITE_URL', 'https://setary.com/' );
    2727define( 'SETARY_APP_URL', 'https://setary.com/app/' );
  • setary/trunk/README.md

    r2802527 r2820735  
    33Tested up to: 6.0.2
    44Requires PHP: 5.6
    5 Stable tag: 0.3.0
     5Stable tag: 0.4.0
    66License: MIT
    77License URI: https://opensource.org/licenses/MIT
     
    5454== Changelog ==
    5555
     56= v0.4.0 (2022-11-18) =
     57* [new] Enabled sale date to/from columns
     58
    5659= v0.3.0 (2022-10-06) =
    5760* [new] Ability to [manage product images](https://setary.com/docs/manage-product-images/?utm_source=setary&utm_medium=changelog).
  • setary/trunk/inc/class-products-with-variations.php

    r2795354 r2820735  
    9595            16 => 'regular_price',
    9696            17 => 'sale_price',
    97             // 18 => 'date_on_sale_from',
    98             // 19 => 'date_on_sale_from_gmt',
    99             // 20 => 'date_on_sale_to',
    100             // 21 => 'date_on_sale_to_gmt',
     97            18 => 'date_on_sale_from',
     98            19 => 'date_on_sale_from_gmt',
     99            20 => 'date_on_sale_to',
     100            21 => 'date_on_sale_to_gmt',
    101101            // 22 => 'price_html',
    102102            23 => 'on_sale',
     
    164164        $item['formatted_categories'] = $this->format_categories( $item );
    165165        $item['formatted_images']     = $this->format_images( $item );
     166        $item['date_on_sale_from']    = $this->format_date( $item['date_on_sale_from'] );
     167        $item['date_on_sale_to']      = $this->format_date( $item['date_on_sale_to'] );
    166168
    167169        return $item;
     
    304306        return implode( ' | ', $categories );
    305307    }
     308
     309    /**
     310     * Format date string.
     311     *
     312     * @param string $date Date.
     313     *
     314     * @return string
     315     */
     316    public function format_date( $date ) {
     317        if ( empty( $date ) ) {
     318            return $date;
     319        }
     320
     321        $date_parts = explode( 'T', $date );
     322
     323        return $date_parts[0];
     324    }
    306325}
  • setary/trunk/setary.php

    r2795354 r2820735  
    1010 * Author:            Setary
    1111 *
    12  * Version:           0.3.0
     12 * Version:           0.4.0
    1313 * Requires at least: 5.7
    1414 * Tested up to:      6.0.2
     
    2323define( 'SETARY_PATH', \plugin_dir_path( __FILE__ ) );
    2424define( 'SETARY_URL', \plugins_url( '/', __FILE__ ) );
    25 define( 'SETARY_VERSION', '0.3.0' );
     25define( 'SETARY_VERSION', '0.4.0' );
    2626define( 'SETARY_SITE_URL', 'https://setary.com/' );
    2727define( 'SETARY_APP_URL', 'https://setary.com/app/' );
Note: See TracChangeset for help on using the changeset viewer.