Plugin Directory

Changeset 2261884


Ignore:
Timestamp:
03/16/2020 03:54:01 PM (6 years ago)
Author:
highways
Message:

Update to 1.0.3

Location:
highways-sync-for-intercom
Files:
7 added
9 edited

Legend:

Unmodified
Added
Removed
  • highways-sync-for-intercom/trunk/highways-sync-for-intercom.php

    r2259247 r2261884  
    44 * Plugin URI:  https://www.highways.io/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    55 * Description: A complete WordPress to Intercom Sync Plugin
    6  * Version: 1.0.2
     6 * Version: 1.0.3
    77 * Author: Highways.io
    88 * Author URI: https://www.highways.io/?utm_source=wp-plugins&utm_campaign=intercom-wp&utm_medium=wp-dash
     
    2222if ( ! defined( 'ABSPATH' ) ) exit;
    2323
    24 define( 'INTERCOM_WP_VERSION', '1.0.2' );
     24define( 'INTERCOM_WP_VERSION', '1.0.3' );
    2525define( 'INTERCOM_WP_PREVIOUS_STABLE_VERSION', '1.0.1' );
    2626define( 'INTERCOM_WP_NAME', 'Highways Sync for Intercom' );
  • highways-sync-for-intercom/trunk/includes/intercom.php

    r2248936 r2261884  
    9090           
    9191            unset($payload['method']);
    92            
    93             error_log('Payload::'.print_r($payload,true));
    9492             
    9593            try {
  • highways-sync-for-intercom/trunk/includes/lib/action-scheduler/action-scheduler.php

    r2248936 r2261884  
    66 * Author: Automattic
    77 * Author URI: https://automattic.com/
    8  * Version: 3.0.1
     8 * Version: 3.1.2
    99 * License: GPLv3
    1010 *
     
    2626 */
    2727
    28 if ( ! function_exists( 'action_scheduler_register_3_dot_0_dot_1' ) ) {
     28if ( ! function_exists( 'action_scheduler_register_3_dot_1_dot_2' ) ) {
    2929
    3030    if ( ! class_exists( 'ActionScheduler_Versions' ) ) {
     
    3333    }
    3434
    35     add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_0_dot_1', 0, 0 );
     35    add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_1_dot_2', 0, 0 );
    3636
    37     function action_scheduler_register_3_dot_0_dot_1() {
     37    function action_scheduler_register_3_dot_1_dot_2() {
    3838        $versions = ActionScheduler_Versions::instance();
    39         $versions->register( '3.0.1', 'action_scheduler_initialize_3_dot_0_dot_1' );
     39        $versions->register( '3.1.2', 'action_scheduler_initialize_3_dot_1_dot_2' );
    4040    }
    4141
    42     function action_scheduler_initialize_3_dot_0_dot_1() {
    43         $autoloader = __DIR__ . '/vendor/autoload.php';
    44         if ( is_readable( $autoloader ) ) {
    45             require_once( $autoloader );
    46             define( 'AS_COMPOSER_AUTOLOADING', true );
    47         } else {
    48             define( 'AS_COMPOSER_AUTOLOADING', false );
    49             require_once( 'classes/abstracts/ActionScheduler.php' );
    50         }
     42    function action_scheduler_initialize_3_dot_1_dot_2() {
     43        require_once( 'classes/abstracts/ActionScheduler.php' );
    5144        ActionScheduler::init( __FILE__ );
    5245    }
     
    5447    // Support usage in themes - load this version if no plugin has loaded a version yet.
    5548    if ( did_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler' ) ) {
    56         action_scheduler_register_3_dot_0_dot_1();
     49        action_scheduler_initialize_3_dot_1_dot_2();
    5750        do_action( 'action_scheduler_pre_theme_init' );
    5851        ActionScheduler_Versions::initialize_latest_version();
  • highways-sync-for-intercom/trunk/includes/lib/action-scheduler/classes/ActionScheduler_DataController.php

    r2248936 r2261884  
    6363    public static function mark_migration_complete() {
    6464        update_option( self::STATUS_FLAG, self::STATUS_COMPLETE );
     65    }
     66
     67    /**
     68     * Unmark migration when a plugin is de-activated. Will not work in case of silent activation, for example in an update.
     69     * We do this to mitigate the bug of lost actions which happens if there was an AS 2.x to AS 3.x migration in the past, but that plugin is now
     70     * deactivated and the site was running on AS 2.x again.
     71     */
     72    public static function mark_migration_incomplete() {
     73        delete_option( self::STATUS_FLAG );
    6574    }
    6675
     
    158167            add_filter( 'action_scheduler_store_class', array( 'ActionScheduler_DataController', 'set_store_class' ), 100 );
    159168            add_filter( 'action_scheduler_logger_class', array( 'ActionScheduler_DataController', 'set_logger_class' ), 100 );
     169            add_action( 'deactivate_plugin', array( 'ActionScheduler_DataController', 'mark_migration_incomplete' ) );
    160170        } elseif ( self::dependencies_met() ) {
    161171            Controller::init();
  • highways-sync-for-intercom/trunk/includes/lib/action-scheduler/classes/ActionScheduler_wcSystemStatus.php

    r2248936 r2261884  
    9494    protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) {
    9595        $as_version = ActionScheduler_Versions::instance()->latest_version();
    96         $autoloader = AS_COMPOSER_AUTOLOADING ? __( 'Composer', 'action-scheduler' ) : __( 'Internal', 'action-scheduler' );
    9796        ?>
    9897
     
    105104                    <td colspan="2" data-export-label="Version"><?php esc_html_e( 'Version:', 'action-scheduler' ); ?></td>
    106105                    <td colspan="3"><?php echo esc_html( $as_version ); ?></td>
    107                 </tr>
    108                 <tr>
    109                     <td colspan="2" data-export-label="Version"><?php esc_html_e( 'Autoloader:', 'action-scheduler' ); ?></td>
    110                     <td colspan="3"><?php echo esc_html( $autoloader ); ?></td>
    111106                </tr>
    112107                <tr>
  • highways-sync-for-intercom/trunk/includes/lib/action-scheduler/classes/abstracts/ActionScheduler.php

    r2248936 r2261884  
    131131    public static function init( $plugin_file ) {
    132132        self::$plugin_file = $plugin_file;
    133         if ( ! AS_COMPOSER_AUTOLOADING ) {
    134             spl_autoload_register( array( __CLASS__, 'autoload' ) );
    135         }
     133        spl_autoload_register( array( __CLASS__, 'autoload' ) );
    136134
    137135        /**
  • highways-sync-for-intercom/trunk/includes/plugin.php

    r2249375 r2261884  
    7575        }
    7676       
     77        /* WooCommerce Shipments */
     78       
     79        if ( $this->iwp_is_plugin_active( 'woocommerce-shipment-tracking/woocommerce-shipment-tracking.php' ) ) {
     80           
     81            require INTERCOM_WP_PATH . '/includes/woocommerce-shipment-tracking.php';
     82       
     83            $wst = new \Intercom_WP\WooCommerce_Shipment_Tracking;
     84        }
     85       
    7786        /* Intercom SDK */
    7887       
  • highways-sync-for-intercom/trunk/includes/wordpress.php

    r2248936 r2261884  
    3939       
    4040        /* Post & Page Tracking */
    41         add_filter('the_content', [$this, 'iwp_the_content'], 10);
     41        add_filter('the_content', [$this, 'iwp_the_content'], 99);
    4242       
    4343        /* Event Filtering */
     
    181181       
    182182        if ( ! $user->exists() ) {
    183            return false;
     183           return $content;
    184184        }
    185185       
  • highways-sync-for-intercom/trunk/readme.txt

    r2259247 r2261884  
    9696== Changelog ==
    9797
     98= 1.0.3 =
     99* FIX: Various Bug Fixes
     100* Added initial WC Shipment Tracking Support for Intercom Messenger
     101
    98102= 1.0.2 =
    99103* FIX: Return $content for the_content when no WP User found
Note: See TracChangeset for help on using the changeset viewer.