Plugin Directory

Changeset 2972942


Ignore:
Timestamp:
09/29/2023 09:29:42 AM (3 years ago)
Author:
rulecom
Message:

Update to version 3.0.3 from GitHub

Location:
woorule
Files:
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woorule/tags/3.0.3/README.txt

    r2963165 r2972942  
    33Tags: rule, woocommerce, newsletter, marketing
    44Requires at least: 5.0.0
    5 Tested up to: 6.3
     5Tested up to: 6.3.1
    66Requires PHP: 5.6+
    7 Stable tag: 3.0.2
     7Stable tag: 3.0.3
    88License: MIT
    99License URI: http://opensource.org/licenses/MIT
     
    108108
    109109For more information, check out our [releases](https://github.com/rulecom/woorule/releases).
     110
     111= 3.0.3 =
     112* Added method for wakeup calls required by some plugins
    110113
    111114= 3.0.2 =
  • woorule/tags/3.0.3/inc/class-productalert-api.php

    r2790316 r2972942  
    7777            array(
    7878                'headers' => array(
    79                     'Authorization' => 'Bearer ' . Woorule_Options::get_api_key(),
     79                    'Authorization' => 'Bearer ' . self::get_api_key(),
    8080                ),
    8181            )
     
    212212        return $resp;
    213213    }
     214
     215    /**
     216     * Get API Key.
     217     *
     218     * @return string
     219     */
     220    private static function get_api_key() {
     221        $api_key = getenv( 'RULE_API_KEY' );
     222        if ( ! $api_key ) {
     223            $api_key = Woorule_Options::get_api_key();
     224        }
     225
     226        return $api_key;
     227    }
    214228}
  • woorule/tags/3.0.3/inc/class-rulemailer-api.php

    r2963165 r2972942  
    2222    use Woorule_Logging;
    2323
    24     const URL = 'https://app.rule.io/api/v2/subscribers?source=woorule&version=3.0.2';
     24    const URL = 'https://app.rule.io/api/v2/subscribers?source=woorule&version=3.0.3';
    2525
    2626    /**
  • woorule/tags/3.0.3/inc/class-woorule-alert-shortcode.php

    r2790316 r2972942  
    7676            );
    7777        }
    78 
    7978    }
    8079
     
    111110            ),
    112111            '',
    113             dirname( __FILE__ ) . '/../templates/'
     112            __DIR__ . '/../templates/'
    114113        );
    115114
  • woorule/tags/3.0.3/inc/class-woorule-alert.php

    r2790316 r2972942  
    184184            ),
    185185            '',
    186             dirname( __FILE__ ) . '/../templates/'
     186            __DIR__ . '/../templates/'
    187187        );
    188188    }
     
    255255     */
    256256    public function woocommerce_init() {
    257         include_once( dirname( __FILE__ ) . '/class-woorule-background-alert-queue.php' );
     257        include_once __DIR__ . '/class-woorule-background-alert-queue.php';
    258258
    259259        self::$background_process = new Woorule_Background_Alert_Queue();
  • woorule/tags/3.0.3/inc/class-woorule-options.php

    r2719394 r2972942  
    3838     * @return void
    3939     */
    40     protected function __wakeup() {
     40    public function __wakeup() {
    4141    }
    4242
  • woorule/tags/3.0.3/inc/class-woorule-order-hooks.php

    r2719394 r2972942  
    210210        switch ( $status_to ) {
    211211            case 'processing':
    212                 $order_date = date_format( $order->get_date_created(), 'Y-m-d H:i:s' );
     212                $date       = $order->get_date_created();
     213                $order_date = date_format( $date ? $date : new \DateTime(), 'Y-m-d H:i:s' );
    213214                break;
    214215            case 'completed':
    215                 $order_date = date_format( $order->get_date_completed(), 'Y-m-d H:i:s' );
     216                $date       = $order->get_date_completed();
     217                $order_date = date_format( $date ? $date : new \DateTime(), 'Y-m-d H:i:s' );
    216218                break;
    217219            default:
  • woorule/tags/3.0.3/inc/class-woorule-shortcode.php

    r2790316 r2972942  
    4343        global $post;
    4444
    45         if ( has_shortcode( $post->post_content, 'woorule' ) ) {
     45        if ( $post && has_shortcode( $post->post_content, 'woorule' ) ) {
    4646            $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    4747
     
    7070            );
    7171        }
    72 
    7372    }
    7473
  • woorule/tags/3.0.3/inc/partials/admin-settings.php

    r2719394 r2972942  
    77
    88// phpcs:disable Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
    9 // phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found
     9// phpcs:disable Universal.WhiteSpace.PrecisionAlignment.Found
    1010
    1111defined( 'ABSPATH' ) || exit;
  • woorule/tags/3.0.3/index.php

    r2637385 r2972942  
    11<?php
    2 
  • woorule/tags/3.0.3/languages/woorule.pot

    r2963165 r2972942  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooRule 3.0.2\n"
     5"Project-Id-Version: WooRule 3.0.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woorule\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • woorule/tags/3.0.3/woorule.php

    r2963165 r2972942  
    99 * Plugin URI:      http://github.com/rulecom/woorule
    1010 * Description:     Rule integration for WooCommerce
    11  * Version:         3.0.2
     11 * Version:         3.0.3
    1212 * Author:          Rule
    1313 * Author URI:      http://rule.se
     
    1616 * Domain Path:     /languages
    1717 * WC requires at least: 3.0.0
    18  * WC tested up to: 8.0.3
     18 * WC tested up to: 8.1.1
    1919 *
    2020 * @package WooRule
    2121 */
    2222
    23 define( 'WOORULE_VERSION', '3.0.2' );
     23define( 'WOORULE_VERSION', '3.0.3' );
    2424define( 'WOORULE_PATH', plugin_dir_path( __FILE__ ) );
    2525define( 'WOORULE_URL', plugin_dir_url( __FILE__ ) );
    2626
    27 add_action( 'before_woocommerce_init', function() {
    28     if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
    29         \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    30     }
    31 } );
     27add_action(
     28    'before_woocommerce_init',
     29    function () {
     30        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     31            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     32        }
     33    }
     34);
    3235
    3336require_once WOORULE_PATH . 'inc/class-woorule.php';
  • woorule/trunk/README.txt

    r2963165 r2972942  
    33Tags: rule, woocommerce, newsletter, marketing
    44Requires at least: 5.0.0
    5 Tested up to: 6.3
     5Tested up to: 6.3.1
    66Requires PHP: 5.6+
    7 Stable tag: 3.0.2
     7Stable tag: 3.0.3
    88License: MIT
    99License URI: http://opensource.org/licenses/MIT
     
    108108
    109109For more information, check out our [releases](https://github.com/rulecom/woorule/releases).
     110
     111= 3.0.3 =
     112* Added method for wakeup calls required by some plugins
    110113
    111114= 3.0.2 =
  • woorule/trunk/inc/class-productalert-api.php

    r2790316 r2972942  
    7777            array(
    7878                'headers' => array(
    79                     'Authorization' => 'Bearer ' . Woorule_Options::get_api_key(),
     79                    'Authorization' => 'Bearer ' . self::get_api_key(),
    8080                ),
    8181            )
     
    212212        return $resp;
    213213    }
     214
     215    /**
     216     * Get API Key.
     217     *
     218     * @return string
     219     */
     220    private static function get_api_key() {
     221        $api_key = getenv( 'RULE_API_KEY' );
     222        if ( ! $api_key ) {
     223            $api_key = Woorule_Options::get_api_key();
     224        }
     225
     226        return $api_key;
     227    }
    214228}
  • woorule/trunk/inc/class-rulemailer-api.php

    r2963165 r2972942  
    2222    use Woorule_Logging;
    2323
    24     const URL = 'https://app.rule.io/api/v2/subscribers?source=woorule&version=3.0.2';
     24    const URL = 'https://app.rule.io/api/v2/subscribers?source=woorule&version=3.0.3';
    2525
    2626    /**
  • woorule/trunk/inc/class-woorule-alert-shortcode.php

    r2790316 r2972942  
    7676            );
    7777        }
    78 
    7978    }
    8079
     
    111110            ),
    112111            '',
    113             dirname( __FILE__ ) . '/../templates/'
     112            __DIR__ . '/../templates/'
    114113        );
    115114
  • woorule/trunk/inc/class-woorule-alert.php

    r2790316 r2972942  
    184184            ),
    185185            '',
    186             dirname( __FILE__ ) . '/../templates/'
     186            __DIR__ . '/../templates/'
    187187        );
    188188    }
     
    255255     */
    256256    public function woocommerce_init() {
    257         include_once( dirname( __FILE__ ) . '/class-woorule-background-alert-queue.php' );
     257        include_once __DIR__ . '/class-woorule-background-alert-queue.php';
    258258
    259259        self::$background_process = new Woorule_Background_Alert_Queue();
  • woorule/trunk/inc/class-woorule-options.php

    r2719394 r2972942  
    3838     * @return void
    3939     */
    40     protected function __wakeup() {
     40    public function __wakeup() {
    4141    }
    4242
  • woorule/trunk/inc/class-woorule-order-hooks.php

    r2719394 r2972942  
    210210        switch ( $status_to ) {
    211211            case 'processing':
    212                 $order_date = date_format( $order->get_date_created(), 'Y-m-d H:i:s' );
     212                $date       = $order->get_date_created();
     213                $order_date = date_format( $date ? $date : new \DateTime(), 'Y-m-d H:i:s' );
    213214                break;
    214215            case 'completed':
    215                 $order_date = date_format( $order->get_date_completed(), 'Y-m-d H:i:s' );
     216                $date       = $order->get_date_completed();
     217                $order_date = date_format( $date ? $date : new \DateTime(), 'Y-m-d H:i:s' );
    216218                break;
    217219            default:
  • woorule/trunk/inc/class-woorule-shortcode.php

    r2790316 r2972942  
    4343        global $post;
    4444
    45         if ( has_shortcode( $post->post_content, 'woorule' ) ) {
     45        if ( $post && has_shortcode( $post->post_content, 'woorule' ) ) {
    4646            $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    4747
     
    7070            );
    7171        }
    72 
    7372    }
    7473
  • woorule/trunk/inc/partials/admin-settings.php

    r2719394 r2972942  
    77
    88// phpcs:disable Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed
    9 // phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found
     9// phpcs:disable Universal.WhiteSpace.PrecisionAlignment.Found
    1010
    1111defined( 'ABSPATH' ) || exit;
  • woorule/trunk/index.php

    r2637385 r2972942  
    11<?php
    2 
  • woorule/trunk/languages/woorule.pot

    r2963165 r2972942  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WooRule 3.0.2\n"
     5"Project-Id-Version: WooRule 3.0.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woorule\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • woorule/trunk/woorule.php

    r2963165 r2972942  
    99 * Plugin URI:      http://github.com/rulecom/woorule
    1010 * Description:     Rule integration for WooCommerce
    11  * Version:         3.0.2
     11 * Version:         3.0.3
    1212 * Author:          Rule
    1313 * Author URI:      http://rule.se
     
    1616 * Domain Path:     /languages
    1717 * WC requires at least: 3.0.0
    18  * WC tested up to: 8.0.3
     18 * WC tested up to: 8.1.1
    1919 *
    2020 * @package WooRule
    2121 */
    2222
    23 define( 'WOORULE_VERSION', '3.0.2' );
     23define( 'WOORULE_VERSION', '3.0.3' );
    2424define( 'WOORULE_PATH', plugin_dir_path( __FILE__ ) );
    2525define( 'WOORULE_URL', plugin_dir_url( __FILE__ ) );
    2626
    27 add_action( 'before_woocommerce_init', function() {
    28     if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
    29         \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
    30     }
    31 } );
     27add_action(
     28    'before_woocommerce_init',
     29    function () {
     30        if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
     31            \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     32        }
     33    }
     34);
    3235
    3336require_once WOORULE_PATH . 'inc/class-woorule.php';
Note: See TracChangeset for help on using the changeset viewer.