Changeset 2273744
- Timestamp:
- 04/02/2020 09:50:50 AM (6 years ago)
- Location:
- shopybot-woocommerce/trunk
- Files:
-
- 4 edited
-
includes/class-wc-shopybot-export.php (modified) (3 diffs)
-
includes/class-wc-shopybot-integration.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
shopybot-woocommerce.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shopybot-woocommerce/trunk/includes/class-wc-shopybot-export.php
r2220716 r2273744 58 58 */ 59 59 public function init() { 60 add_filter('mod_rewrite_rules', array($this, 'add_htaccess_rule'));61 62 60 add_action("added_post_meta", array($this, 'generateOffer'), 10, 2); 63 61 add_action('updated_postmeta', array($this, 'generateOffer'), 10, 2); … … 71 69 } 72 70 73 public function add_htaccess_rule($rules) {74 $rules .= "RewriteRule ^" . $this->id . ".xml index.php\n";75 $rules .= "RewriteRule ^" . $this->id . ".xml.gz index.php\n";76 77 return $rules;78 }79 80 71 public function getYmlAction() { 81 72 if(get_option('permalink_structure') != '') { 82 73 $url = parse_url($this->siteURL() . $_SERVER['REQUEST_URI']); 83 74 84 if($url['path'] == '/' . $this->id . '.xml') { 75 if(preg_match('/'.$this->id . '.xml.gz'.'/', $url['path'], $matches)) { 76 $this->getYml(true); 77 die; 78 } 79 80 if(preg_match('/'.$this->id . '.xml'.'/', $url['path'], $matches)) { 85 81 $this->getYml(); 86 die;87 }88 89 if($url['path'] == '/' . $this->id . '.xml.gz') {90 $this->getYml(true);91 82 die; 92 83 } … … 647 638 */ 648 639 public function export() { 649 // if(!$this->isLock()) { 650 651 // $this->exportLock(); 652 653 if($this->inProcess()) { 654 // error_log("in process"); 655 $this->bread('in process'); 656 $this->renderPartOffers(); 657 } else { 658 // error_log("not in process"); 659 $this->bread('not in process'); 660 $this->bread('check time true'); 661 $this->inProcessSet('yes'); 662 $this->renderPartOffers(); 663 } 664 665 if($this->yaml_finished) { 666 // error_log("yaml finished"); 667 $this->bread('is yaml_finished true'); 668 $this->inProcessSet('no'); 669 $this->setPage(1); 670 } 671 672 // $this->exportUnlock(); 673 // } else { 674 // $this->bread('process is lock'); 675 // } 640 if($this->inProcess()) { 641 // error_log("in process"); 642 $this->bread('in process'); 643 $this->renderPartOffers(); 644 } else { 645 // error_log("not in process"); 646 $this->bread('not in process'); 647 $this->bread('check time true'); 648 $this->inProcessSet('yes'); 649 $this->renderPartOffers(); 650 } 651 652 if($this->yaml_finished) { 653 // error_log("yaml finished"); 654 $this->bread('is yaml_finished true'); 655 $this->inProcessSet('no'); 656 $this->setPage(1); 657 } 676 658 } 677 659 -
shopybot-woocommerce/trunk/includes/class-wc-shopybot-integration.php
r2222403 r2273744 44 44 // Checking whether we auto checkouting 45 45 add_action('template_redirect', array($this, 'wc_auto_checkout'), 10); 46 // Filters47 add_filter('mod_rewrite_rules', array($this, 'add_htaccess_rule'));48 46 } 49 50 public function add_htaccess_rule($rules) {51 $rules .= "RewriteRule ^" . $this->export_filename . " index.php\n";52 $rules .= "RewriteRule ^" . $this->export_filename . ".gz index.php\n";53 54 return $rules;55 }56 47 57 48 public function wc_auto_checkout() { -
shopybot-woocommerce/trunk/readme.txt
r2222403 r2273744 3 3 Tags: bot, e-commerce, chat-bot, chatbot, messenger, facebook, woocommerce, integration, ShopyBot, ai, machine learning, artificial intelligence 4 4 Requires at least: 3.9 5 Tested up to: 5. 3.26 Stable tag: 1.0.1 05 Tested up to: 5.4 6 Stable tag: 1.0.11 7 7 License: GNU GENERAL PUBLIC LICENSE Version 3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 100 100 == Changelog == 101 101 102 = 1.0.11 = 103 - Fixed export XML file url (shopybot-woocommerce.xml) for Wordpress installations in subfolders 104 - Tested plugin on Wordpress 5.4 and WooCommerce 4.0.1 105 102 106 = 1.0.10 = 103 107 Added uninstall hook -
shopybot-woocommerce/trunk/shopybot-woocommerce.php
r2222403 r2273744 9 9 * that starts the plugin. 10 10 * 11 * @link https://www.shopybot.com12 * @since 1.0.1013 * @package Shopybot_Woocommerce11 * @link https://www.shopybot.com 12 * @since 1.0.11 13 * @package Shopybot_Woocommerce 14 14 * 15 15 * @wordpress-plugin 16 * Plugin Name: ShopyBot - Facebook ChatBot for WooCommerce 17 * Plugin URI: https://www.shopybot.com/connect-bot/woocommerce 18 * Description: Create a ChatBot and sell your products in Facebook Messenger 19 * Version: 1.0.10 20 * Author: ShopyBot 21 * Author URI: https://www.shopybot.com 22 * License: GPL-2.0+ 23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 24 * Text Domain: shopybot-woocommerce 25 * Domain Path: /languages 16 * Plugin Name: ShopyBot - Facebook ChatBot for WooCommerce 17 * Plugin URI: https://www.shopybot.com/connect-bot/woocommerce 18 * Description: Create a ChatBot and sell your products in Facebook Messenger 19 * Version: 1.0.11 20 * Author: ShopyBot 21 * Author URI: https://www.shopybot.com 22 * License: GPL-2.0+ 23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 24 * Text Domain: shopybot-woocommerce 25 * Domain Path: /languages 26 * Woo: 2127297:0ea4fe4c2d7ca6338f8a322fb3e4e187 27 * Text Domain: shopybot-woocommerce 28 * Requires at least: 4.9 29 * Tested up to: 5.4 30 * WC requires at least: 3.0.0 31 * WC tested up to: 4.0.1 26 32 */ 27 33
Note: See TracChangeset
for help on using the changeset viewer.