Changeset 2979381
- Timestamp:
- 10/16/2023 07:30:23 AM (2 years ago)
- Location:
- shop-2-api/trunk
- Files:
-
- 3 edited
-
includes/Base/Enqueue.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
shop-2-api.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shop-2-api/trunk/includes/Base/Enqueue.php
r2962006 r2979381 28 28 add_action('delete_term', array($this, 'fire_update_events'), 10, 3); 29 29 // Add events for Attributes 30 add_action('woocommerce_attribute_added', array($this, 'fire_update_events_attr '), 10, 1);31 add_action('woocommerce_attribute_updated', array($this, 'fire_update_events_attr'), 10, 1);32 add_action('woocommerce_attribute_deleted', array($this, 'fire_update_events _attr'), 10, 1);30 add_action('woocommerce_attribute_added', array($this, 'fire_update_events_attr_added'), 10, 2); 31 add_action('woocommerce_attribute_updated', array($this, 'fire_update_events_attr'), 10, 3); 32 add_action('woocommerce_attribute_deleted', array($this, 'fire_update_events'), 10, 3); 33 33 // Add events for product update 34 add_action('woocommerce_update_product', array($this, 'fire_sync_event'), 10, 1); 34 add_action('woocommerce_update_product', array($this, 'fire_sync_event'), 10, 2); 35 add_action('woocommerce_update_product_variation', array($this, 'fire_sync_event'), 10, 2); 35 36 // Order Status Completed. 36 37 add_action( 'woocommerce_order_status_completed', array($this, 'action_woocommerce_order_status_completed'), 10, 1 ); … … 80 81 } 81 82 82 public function fire_update_events_attr($id): void 83 public function fire_update_events_attr($id, $data, $old_slug): void 84 { 85 require_once SHOP2API_PLUGIN_PATH . '/includes/Api/Shop2ApiConnect.php'; 86 $shop_2_api_connection = new Shop2ApiConnect(); 87 $shop_2_api_connection->update_attr_cache(); 88 } 89 90 public function fire_update_events_attr_added($id, $data): void 83 91 { 84 92 require_once SHOP2API_PLUGIN_PATH . '/includes/Api/Shop2ApiConnect.php'; … … 95 103 } 96 104 97 public function fire_sync_event($product_id ): void105 public function fire_sync_event($product_id, $product): void 98 106 { 99 107 if (isset($_POST['shop2api_sync_called'])) { … … 107 115 $shop_2_api_connection->sync_woocommerce_to_bol_with_id($product_id); 108 116 $shop_2_api_connection->update_metadata_cache(); 109 110 117 } 111 118 -
shop-2-api/trunk/readme.txt
r2975851 r2979381 3 3 Plugin URI: https://wordpress.org/plugins/shop-2-api/ 4 4 Tags: WooCommerce, Bol 5 Stable Tag: 1.0.27 5 Stable Tag: 1.0.27.1 6 6 Requires at least: 5.0 7 7 Requires PHP: 7.2 … … 151 151 2) Fixed bug with the custom WooCommerce Updates. 152 152 3) Updated dashboard. 153 4) Added hook for update product variations. 153 154 154 155 == Instructions == -
shop-2-api/trunk/shop-2-api.php
r2975851 r2979381 5 5 Plugin URI: https://wordpress.org/plugins/shop-2-api/ 6 6 Description: The plugin Shop2Api will sync products between e-Commerce platforms. The current supported e-Commerce platforms are WooCommerce to Bol.com, and we are working on Amazon, Shopify and others. We added a koopblok service so that you can check if you lower your price can you get koopblok. 7 Version: 1.0.27 7 Version: 1.0.27.1 8 8 Requires at least: 5.0 9 9 Requires PHP: 7.2 … … 34 34 define('SHOP2API_PLUGIN_URL', plugin_dir_url( __FILE__ )); 35 35 define('SHOP2API_PLUGIN', plugin_basename( __FILE__ )); 36 define ('VERSION', '1.0.27 ');36 define ('VERSION', '1.0.27.1'); 37 37 38 38 // Register items in the project.
Note: See TracChangeset
for help on using the changeset viewer.