Changeset 3163755
- Timestamp:
- 10/06/2024 10:36:57 PM (16 months ago)
- Location:
- syncio-multistore-product-inventory-sync-for-woocommerce/trunk
- Files:
-
- 4 edited
-
Syncio.php (modified) (3 diffs)
-
View/index.php (modified) (1 diff)
-
plugin.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
syncio-multistore-product-inventory-sync-for-woocommerce/trunk/Syncio.php
r3155468 r3163755 44 44 45 45 add_action('admin_menu', array($this, 'registerMenu')); 46 add_action('wp_footer', array($this,'add_intercom_chatbot')); 46 47 } 47 48 … … 71 72 public function register_scripts() 72 73 { 73 if (! isset($_GET['page']) && strpos(sanitize_key($_GET['page']), 'syncio') !== true) {74 if (! isset($_GET['page']) && strpos(sanitize_key($_GET['page']), 'syncio') !== true) { 74 75 return; 75 76 } 76 77 77 78 wp_enqueue_script( 78 79 'syncio-frontend-js', … … 166 167 } 167 168 168 // function okToActivateSyncioPlugin() 169 // { 170 // return in_array('woocommerce/woocommerce.php', get_option('active_plugins')); 171 // } 172 173 // function uninstallSyncioPlugin() 174 // { 175 // if (in_array('Syncio/plugin.php', get_option('active_plugins'))) 176 // deactivate_plugins(['Syncio/plugin.php']); 177 // if (in_array('syncio-global-dropshipping', get_option('active_plugins'))) 178 // deactivate_plugins(['syncio-global-dropshipping/plugin.php']); 179 // } 180 181 //function sendErrorMessage($title, $desc) 182 //{ 183 // printf('<div class="error"> 184 // <p>' . 185 // esc_html__($title) 186 // . '</p> 187 // <p> 188 // <b>Error: </b>' . esc_html__($desc) 189 // . '</p> 190 // </div>'); 191 //} 192 193 //function removePluginActivatedMessage() 194 //{ 195 // unset($_GET['activate'], $_GET['error']); 196 //} 197 198 /** 199 * Place code for your plugin's functionality here. 200 */ 201 // private function run_plugin() 202 // { 203 // // if ($this->okToActivateSyncioPlugin()) { 204 205 // // } else { 206 // // $this->uninstallSyncioPlugin(); 207 // // $this->removePluginActivatedMessage(); 208 // // $this->sendErrorMessage('Syncio plugin', 'WooCoommerce needs to be installed and activated before you can activate Syncio plugin.'); 209 // // } 210 // } 169 function add_intercom_chatbot() { 170 ?> 171 <script> 172 window.intercomSettings = { 173 api_base: "https://api-iam.intercom.io", 174 app_id: "<?php echo SYNCIO_INTERCOM_APP_ID; ?>", 175 //user_id: user.id, // IMPORTANT: Replace "user.id" with the variable you use to capture the user's ID 176 name: "<?php echo get_option('siteurl'); ?>", // IMPORTANT: Replace "user.name" with the variable you use to capture the user's name 177 email: "<?php echo get_option('admin_email'); ?>", // IMPORTANT: Replace "syncio_globals.admin_email" with the variable you use to capture the admin's email address 178 'Platform': 'woo', 179 'URL': "<?php echo get_option('siteurl'); ?>", 180 }; 181 </script> 182 183 <script> 184 (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/z6dvdx17';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(document.readyState==='complete'){l();}else if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})(); 185 </script> 186 <?php 187 if(get_option('syncio_plugin_just_activated')) { 188 ?> 189 <script> 190 console.log('plugin activated- intercom event fired'); 191 window.Intercom('trackEvent', 'plugin-installed', { 192 plugin_name: 'Syncio-wp-plugin', 193 plugin_version: '<?php echo SYNCIO_PLUGIN_VERSION; ?>', 194 }); 195 </script> 196 <?php 197 delete_option('syncio_plugin_just_activated'); 198 } 199 200 } 211 201 212 202 private function init_rests() -
syncio-multistore-product-inventory-sync-for-woocommerce/trunk/View/index.php
r3155468 r3163755 48 48 </div> 49 49 </div> 50 <?php wp_footer(); ?> 50 51 </body> 51 52 </html> -
syncio-multistore-product-inventory-sync-for-woocommerce/trunk/plugin.php
r3156022 r3163755 4 4 Requires Plugins: woocommerce 5 5 Description: Seamlessly sync inventory and products across multiple WooCommerce and Shopify stores. Efficiently manage WooCommerce multistor 6 Version: 1.0.1 56 Version: 1.0.16 7 7 Author: syncio.co 8 8 Author URI: https://syncio.co … … 19 19 20 20 // Define constants. 21 define( 'SYNCIO_PLUGIN_VERSION', '1.0.1 5' );21 define( 'SYNCIO_PLUGIN_VERSION', '1.0.16' ); 22 22 23 23 … … 37 37 define( 'SYNCIO_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); 38 38 define( 'SYNCIO_RETAILER_REST_PATH', '/wp-json/syncio/retailer/v1/' ); 39 define('SYNCIO_INTERCOM_APP_ID', 'z6dvdx17'); 40 41 //register activation hook 42 register_activation_hook( __FILE__, function() { 43 add_option('syncio_plugin_just_activated',true); 44 }); 39 45 40 46 -
syncio-multistore-product-inventory-sync-for-woocommerce/trunk/readme.txt
r3156022 r3163755 17 17 == Third-Party Libraries 18 18 This plugin makes use of the following third-party libraries: 19 - intercom.js: [ npm package](https://www.npmjs.com/package/intercom.js) 20 - Compressed file: `/js/intercom.min.js` [CDN link](https://unpkg.com/[email protected]/dist/intercom.min.js) 21 - Uncompressed file: `/assets/js/intercom-uncompressed.js 19 22 - SweetAlert.js: [GitHub Repository](https://github.com/t4t5/sweetalert) 20 23 - Compressed file: `/js/sweetalert.min.js` [CDN link](https://unpkg.com/[email protected]/dist/sweetalert.min.js) … … 131 134 == Changelog == 132 135 136 = 1.0.16 = 137 * fixed some security bugs 138 * added intercom for customer support 139 133 140 = 1.0.15 = 134 141 * updated readme
Note: See TracChangeset
for help on using the changeset viewer.