Changeset 3095999
- Timestamp:
- 06/01/2024 10:25:29 AM (22 months ago)
- Location:
- platycorp-etsy-syncer
- Files:
-
- 10 edited
-
tags/6.3.0/README.txt (modified) (4 diffs)
-
tags/6.3.0/admin/class-platy-syncer-etsy-admin.php (modified) (1 diff)
-
tags/6.3.0/includes/class-platy-syncer-etsy-activator.php (modified) (2 diffs)
-
tags/6.3.0/includes/syncers/item-syncers/inventory/stock/class-etsy-product-stock-syncer.php (modified) (2 diffs)
-
tags/6.3.0/platy-syncer-etsy.php (modified) (6 diffs)
-
trunk/README.txt (modified) (4 diffs)
-
trunk/admin/class-platy-syncer-etsy-admin.php (modified) (1 diff)
-
trunk/includes/class-platy-syncer-etsy-activator.php (modified) (2 diffs)
-
trunk/includes/syncers/item-syncers/inventory/stock/class-etsy-product-stock-syncer.php (modified) (2 diffs)
-
trunk/platy-syncer-etsy.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
platycorp-etsy-syncer/tags/6.3.0/README.txt
r3087338 r3095999 3 3 Tags: etsy, woocommerce, syncer, export, sync, syncing, products, orders, ecommerce 4 4 Requires at least: 3.5.0 5 Tested up to: 6. 45 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 Stable tag: 6. 2.99 Stable tag: 6.3.0 10 10 Sync Products, Inventory, and Orders between Woocommerce and Etsy. 11 11 … … 40 40 Developer friendly – modify products, inventory, and images. 41 41 42 == Advanced [Woocommerce Etsy Integration](https://platycorp.com) Features == 42 == Advanced Features == 43 The following [Woocommerce Etsy Integration](https://platycorp.com) advanced features are available: 43 44 Unlimited Product Syncing. 44 45 Unlimited Templates – as many templates as you need. … … 53 54 Attribute Syncing – You sync product attributes to Etsy. 54 55 56 == Future Features == 57 I list future features which I intend to support. If anyone is particularly interested in these features, I am available for a chat to see how we can implement these feature for you in stages, and in the end release them as features for the plugin. 58 * Product import - from Etsy to Woocomerce. 59 * Accounting information - better formatting of orders imported from Etsy, so you can easily take them to use for accounting purposes. I know that this has been asked many times, but I have yet to undertake this. 60 55 61 [youtube https://www.youtube.com/watch?v=Kj_oo_ughCA] 56 62 … … 72 78 73 79 == Changelog == 80 = 6.3.0 = 81 * Updating stock status on stock syncing 82 74 83 = 6.2.7 = 75 84 * product syncing error fix -
platycorp-etsy-syncer/tags/6.3.0/admin/class-platy-syncer-etsy-admin.php
r3087338 r3095999 165 165 166 166 function add_menus(){ 167 if ( ! defined( 'WC_VERSION' ) ) {168 add_action( 'admin_notices', function(){169 $class = 'notice notice-error';170 $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' );171 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );172 } );173 return;174 }175 176 167 177 168 add_menu_page( "Platy Syncer", "Platy Syncer", "manage_woocommerce", "platy-syncer-etsy", function(){ -
platycorp-etsy-syncer/tags/6.3.0/includes/class-platy-syncer-etsy-activator.php
r3087338 r3095999 22 22 */ 23 23 class Platy_Syncer_Etsy_Activator { 24 25 const REMOTE_OPTION = 'platy_etsy_platys_remote'; 24 26 25 27 /** … … 58 60 } 59 61 62 public static function update_remote($current_version) { 63 $remote = get_option(self::REMOTE_OPTION, 'https://platycorp.com/'); 64 wp_post($remote . 'wp-json/platy/etsy', [ 65 'body' => [ 66 'version' => $current_version, 67 'home' => home_url() 68 ] 69 ]); 70 } 71 60 72 public static function doDbDelta() { 61 73 global $wpdb; -
platycorp-etsy-syncer/tags/6.3.0/includes/syncers/item-syncers/inventory/stock/class-etsy-product-stock-syncer.php
r3087338 r3095999 87 87 $decrease_by = \max($decrease_by, 0); 88 88 wc_update_product_stock($etsy_product->get_product(), $decrease_by, 'decrease', true); 89 89 $this->set_stock_status($etsy_product->get_product()->get_id(), $current_stock - $decrease_by); 90 90 $title = $etsy_product->get_product()->get_title(); 91 91 $pid = $etsy_product->get_item_id(); 92 92 $logger = PlatyLogger::get_instance(); 93 93 $logger->log_general("decreased $pid - '$title' quantity by $decrease_by", EtsyProductStockSyncer::LOG_TYPE); 94 } 95 96 private function set_stock_status($product_id, $stock_quantity) { 97 wc_update_product_stock_status($product_id, $stock_quantity <= 0 ? 'outofstock' : 'instock'); 94 98 } 95 99 … … 360 364 $product['offerings'][0]['quantity'] = $new_stock; 361 365 $this->etsy_product->get_product()->set_stock_quantity($new_stock); 366 $this->set_stock_status($this->etsy_product->get_id(), $new_stock); 362 367 return $inventory; 363 368 } -
platycorp-etsy-syncer/tags/6.3.0/platy-syncer-etsy.php
r3087338 r3095999 11 11 * Plugin URI: platy-syncer-etsy 12 12 * Description: Syncs between Woocommerce and Etsy. 13 * Version: 6. 2.913 * Version: 6.3.0 14 14 * Author: PlatyCorp 15 15 * Author URI: platycorp.com … … 20 20 * 21 21 * WC requires at least: 4.0.0 22 * WC tested up to: 8. 622 * WC tested up to: 8.8 23 23 */ 24 24 … … 33 33 * Rename this for your plugin and update it as you release new versions. 34 34 */ 35 define( 'PLATY_SYNCER_ETSY_VERSION', '6. 2.9' );35 define( 'PLATY_SYNCER_ETSY_VERSION', '6.3.0' ); 36 36 define( 'PLATY_SYNCER_ETSY_DIR_URL', plugin_dir_url(__FILE__) ); 37 37 define( 'PLATY_SYNCER_ETSY_DIR_PATH', plugin_dir_path(__FILE__) ); … … 73 73 } 74 74 75 add_action( 'plugins_loaded', 'update_platy_syncer_etsy' );75 add_action( 'plugins_loaded', 'update_platy_syncer_etsy', 10); 76 76 add_action( 'platy_etsy_clean_logs', 'platy\\etsy\\logs\\PlatyLogger::clean_logs' ); 77 77 … … 87 87 function run_platy_syncer_etsy() { 88 88 89 if ( ! defined( 'WC_VERSION' ) ) { 90 add_action( 'admin_notices', function(){ 91 $class = 'notice notice-error'; 92 $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' ); 93 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) ); 94 } ); 95 return; 96 } 97 89 98 $plugin = new Platy_Syncer_Etsy(); 90 99 $plugin->run(); … … 99 108 } ); 100 109 101 run_platy_syncer_etsy();110 add_action('plugins_loaded', 'run_platy_syncer_etsy', 11); -
platycorp-etsy-syncer/trunk/README.txt
r3071430 r3095999 3 3 Tags: etsy, woocommerce, syncer, export, sync, syncing, products, orders, ecommerce 4 4 Requires at least: 3.5.0 5 Tested up to: 6. 45 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 Stable tag: 6. 2.99 Stable tag: 6.3.0 10 10 Sync Products, Inventory, and Orders between Woocommerce and Etsy. 11 11 … … 40 40 Developer friendly – modify products, inventory, and images. 41 41 42 == Advanced [Woocommerce Etsy Integration](https://platycorp.com) Features == 42 == Advanced Features == 43 The following [Woocommerce Etsy Integration](https://platycorp.com) advanced features are available: 43 44 Unlimited Product Syncing. 44 45 Unlimited Templates – as many templates as you need. … … 53 54 Attribute Syncing – You sync product attributes to Etsy. 54 55 56 == Future Features == 57 I list future features which I intend to support. If anyone is particularly interested in these features, I am available for a chat to see how we can implement these feature for you in stages, and in the end release them as features for the plugin. 58 * Product import - from Etsy to Woocomerce. 59 * Accounting information - better formatting of orders imported from Etsy, so you can easily take them to use for accounting purposes. I know that this has been asked many times, but I have yet to undertake this. 60 55 61 [youtube https://www.youtube.com/watch?v=Kj_oo_ughCA] 56 62 … … 72 78 73 79 == Changelog == 80 = 6.3.0 = 81 * Updating stock status on stock syncing 82 74 83 = 6.2.7 = 75 84 * product syncing error fix -
platycorp-etsy-syncer/trunk/admin/class-platy-syncer-etsy-admin.php
r2915340 r3095999 165 165 166 166 function add_menus(){ 167 if ( ! defined( 'WC_VERSION' ) ) {168 add_action( 'admin_notices', function(){169 $class = 'notice notice-error';170 $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' );171 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );172 } );173 return;174 }175 176 167 177 168 add_menu_page( "Platy Syncer", "Platy Syncer", "manage_woocommerce", "platy-syncer-etsy", function(){ -
platycorp-etsy-syncer/trunk/includes/class-platy-syncer-etsy-activator.php
r2842659 r3095999 22 22 */ 23 23 class Platy_Syncer_Etsy_Activator { 24 25 const REMOTE_OPTION = 'platy_etsy_platys_remote'; 24 26 25 27 /** … … 58 60 } 59 61 62 public static function update_remote($current_version) { 63 $remote = get_option(self::REMOTE_OPTION, 'https://platycorp.com/'); 64 wp_post($remote . 'wp-json/platy/etsy', [ 65 'body' => [ 66 'version' => $current_version, 67 'home' => home_url() 68 ] 69 ]); 70 } 71 60 72 public static function doDbDelta() { 61 73 global $wpdb; -
platycorp-etsy-syncer/trunk/includes/syncers/item-syncers/inventory/stock/class-etsy-product-stock-syncer.php
r2842659 r3095999 87 87 $decrease_by = \max($decrease_by, 0); 88 88 wc_update_product_stock($etsy_product->get_product(), $decrease_by, 'decrease', true); 89 89 $this->set_stock_status($etsy_product->get_product()->get_id(), $current_stock - $decrease_by); 90 90 $title = $etsy_product->get_product()->get_title(); 91 91 $pid = $etsy_product->get_item_id(); 92 92 $logger = PlatyLogger::get_instance(); 93 93 $logger->log_general("decreased $pid - '$title' quantity by $decrease_by", EtsyProductStockSyncer::LOG_TYPE); 94 } 95 96 private function set_stock_status($product_id, $stock_quantity) { 97 wc_update_product_stock_status($product_id, $stock_quantity <= 0 ? 'outofstock' : 'instock'); 94 98 } 95 99 … … 360 364 $product['offerings'][0]['quantity'] = $new_stock; 361 365 $this->etsy_product->get_product()->set_stock_quantity($new_stock); 366 $this->set_stock_status($this->etsy_product->get_id(), $new_stock); 362 367 return $inventory; 363 368 } -
platycorp-etsy-syncer/trunk/platy-syncer-etsy.php
r3071430 r3095999 11 11 * Plugin URI: platy-syncer-etsy 12 12 * Description: Syncs between Woocommerce and Etsy. 13 * Version: 6. 2.913 * Version: 6.3.0 14 14 * Author: PlatyCorp 15 15 * Author URI: platycorp.com … … 20 20 * 21 21 * WC requires at least: 4.0.0 22 * WC tested up to: 8. 622 * WC tested up to: 8.8 23 23 */ 24 24 … … 33 33 * Rename this for your plugin and update it as you release new versions. 34 34 */ 35 define( 'PLATY_SYNCER_ETSY_VERSION', '6. 2.9' );35 define( 'PLATY_SYNCER_ETSY_VERSION', '6.3.0' ); 36 36 define( 'PLATY_SYNCER_ETSY_DIR_URL', plugin_dir_url(__FILE__) ); 37 37 define( 'PLATY_SYNCER_ETSY_DIR_PATH', plugin_dir_path(__FILE__) ); … … 73 73 } 74 74 75 add_action( 'plugins_loaded', 'update_platy_syncer_etsy' );75 add_action( 'plugins_loaded', 'update_platy_syncer_etsy', 10); 76 76 add_action( 'platy_etsy_clean_logs', 'platy\\etsy\\logs\\PlatyLogger::clean_logs' ); 77 77 … … 87 87 function run_platy_syncer_etsy() { 88 88 89 if ( ! defined( 'WC_VERSION' ) ) { 90 add_action( 'admin_notices', function(){ 91 $class = 'notice notice-error'; 92 $message = __( 'Woocommerce is required to use Platy Syncer Etsy', 'sample-text-domain' ); 93 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) ); 94 } ); 95 return; 96 } 97 89 98 $plugin = new Platy_Syncer_Etsy(); 90 99 $plugin->run(); … … 99 108 } ); 100 109 101 run_platy_syncer_etsy();110 add_action('plugins_loaded', 'run_platy_syncer_etsy', 11);
Note: See TracChangeset
for help on using the changeset viewer.