Changeset 2261884
- Timestamp:
- 03/16/2020 03:54:01 PM (6 years ago)
- Location:
- highways-sync-for-intercom
- Files:
-
- 7 added
- 9 edited
-
.idea (added)
-
.idea/highways-sync-for-intercom.iml (added)
-
.idea/misc.xml (added)
-
.idea/modules.xml (added)
-
.idea/vcs.xml (added)
-
.idea/workspace.xml (added)
-
trunk/highways-sync-for-intercom.php (modified) (2 diffs)
-
trunk/includes/intercom.php (modified) (1 diff)
-
trunk/includes/lib/action-scheduler/action-scheduler.php (modified) (4 diffs)
-
trunk/includes/lib/action-scheduler/classes/ActionScheduler_DataController.php (modified) (2 diffs)
-
trunk/includes/lib/action-scheduler/classes/ActionScheduler_wcSystemStatus.php (modified) (2 diffs)
-
trunk/includes/lib/action-scheduler/classes/abstracts/ActionScheduler.php (modified) (1 diff)
-
trunk/includes/plugin.php (modified) (1 diff)
-
trunk/includes/woocommerce-shipment-tracking.php (added)
-
trunk/includes/wordpress.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
highways-sync-for-intercom/trunk/highways-sync-for-intercom.php
r2259247 r2261884 4 4 * Plugin URI: https://www.highways.io/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 5 5 * Description: A complete WordPress to Intercom Sync Plugin 6 * Version: 1.0. 26 * Version: 1.0.3 7 7 * Author: Highways.io 8 8 * Author URI: https://www.highways.io/?utm_source=wp-plugins&utm_campaign=intercom-wp&utm_medium=wp-dash … … 22 22 if ( ! defined( 'ABSPATH' ) ) exit; 23 23 24 define( 'INTERCOM_WP_VERSION', '1.0. 2' );24 define( 'INTERCOM_WP_VERSION', '1.0.3' ); 25 25 define( 'INTERCOM_WP_PREVIOUS_STABLE_VERSION', '1.0.1' ); 26 26 define( 'INTERCOM_WP_NAME', 'Highways Sync for Intercom' ); -
highways-sync-for-intercom/trunk/includes/intercom.php
r2248936 r2261884 90 90 91 91 unset($payload['method']); 92 93 error_log('Payload::'.print_r($payload,true));94 92 95 93 try { -
highways-sync-for-intercom/trunk/includes/lib/action-scheduler/action-scheduler.php
r2248936 r2261884 6 6 * Author: Automattic 7 7 * Author URI: https://automattic.com/ 8 * Version: 3. 0.18 * Version: 3.1.2 9 9 * License: GPLv3 10 10 * … … 26 26 */ 27 27 28 if ( ! function_exists( 'action_scheduler_register_3_dot_ 0_dot_1' ) ) {28 if ( ! function_exists( 'action_scheduler_register_3_dot_1_dot_2' ) ) { 29 29 30 30 if ( ! class_exists( 'ActionScheduler_Versions' ) ) { … … 33 33 } 34 34 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 ); 36 36 37 function action_scheduler_register_3_dot_ 0_dot_1() {37 function action_scheduler_register_3_dot_1_dot_2() { 38 38 $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' ); 40 40 } 41 41 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' ); 51 44 ActionScheduler::init( __FILE__ ); 52 45 } … … 54 47 // Support usage in themes - load this version if no plugin has loaded a version yet. 55 48 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(); 57 50 do_action( 'action_scheduler_pre_theme_init' ); 58 51 ActionScheduler_Versions::initialize_latest_version(); -
highways-sync-for-intercom/trunk/includes/lib/action-scheduler/classes/ActionScheduler_DataController.php
r2248936 r2261884 63 63 public static function mark_migration_complete() { 64 64 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 ); 65 74 } 66 75 … … 158 167 add_filter( 'action_scheduler_store_class', array( 'ActionScheduler_DataController', 'set_store_class' ), 100 ); 159 168 add_filter( 'action_scheduler_logger_class', array( 'ActionScheduler_DataController', 'set_logger_class' ), 100 ); 169 add_action( 'deactivate_plugin', array( 'ActionScheduler_DataController', 'mark_migration_incomplete' ) ); 160 170 } elseif ( self::dependencies_met() ) { 161 171 Controller::init(); -
highways-sync-for-intercom/trunk/includes/lib/action-scheduler/classes/ActionScheduler_wcSystemStatus.php
r2248936 r2261884 94 94 protected function get_template( $status_labels, $action_counts, $oldest_and_newest ) { 95 95 $as_version = ActionScheduler_Versions::instance()->latest_version(); 96 $autoloader = AS_COMPOSER_AUTOLOADING ? __( 'Composer', 'action-scheduler' ) : __( 'Internal', 'action-scheduler' );97 96 ?> 98 97 … … 105 104 <td colspan="2" data-export-label="Version"><?php esc_html_e( 'Version:', 'action-scheduler' ); ?></td> 106 105 <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>111 106 </tr> 112 107 <tr> -
highways-sync-for-intercom/trunk/includes/lib/action-scheduler/classes/abstracts/ActionScheduler.php
r2248936 r2261884 131 131 public static function init( $plugin_file ) { 132 132 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' ) ); 136 134 137 135 /** -
highways-sync-for-intercom/trunk/includes/plugin.php
r2249375 r2261884 75 75 } 76 76 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 77 86 /* Intercom SDK */ 78 87 -
highways-sync-for-intercom/trunk/includes/wordpress.php
r2248936 r2261884 39 39 40 40 /* Post & Page Tracking */ 41 add_filter('the_content', [$this, 'iwp_the_content'], 10);41 add_filter('the_content', [$this, 'iwp_the_content'], 99); 42 42 43 43 /* Event Filtering */ … … 181 181 182 182 if ( ! $user->exists() ) { 183 return false;183 return $content; 184 184 } 185 185 -
highways-sync-for-intercom/trunk/readme.txt
r2259247 r2261884 96 96 == Changelog == 97 97 98 = 1.0.3 = 99 * FIX: Various Bug Fixes 100 * Added initial WC Shipment Tracking Support for Intercom Messenger 101 98 102 = 1.0.2 = 99 103 * FIX: Return $content for the_content when no WP User found
Note: See TracChangeset
for help on using the changeset viewer.