Changeset 2579767
- Timestamp:
- 08/07/2021 10:15:01 PM (5 years ago)
- Location:
- integrai
- Files:
-
- 8 edited
- 1 copied
-
tags/1.0.11 (copied) (copied from integrai/trunk)
-
tags/1.0.11/includes/class-integrai.php (modified) (1 diff)
-
tags/1.0.11/integrai.php (modified) (2 diffs)
-
tags/1.0.11/public/class-integrai-public.php (modified) (6 diffs)
-
tags/1.0.11/readme.txt (modified) (1 diff)
-
trunk/includes/class-integrai.php (modified) (1 diff)
-
trunk/integrai.php (modified) (2 diffs)
-
trunk/public/class-integrai-public.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
integrai/tags/1.0.11/includes/class-integrai.php
r2579713 r2579767 29 29 $this->version = INTEGRAI_VERSION; 30 30 } else { 31 $this->version = '1.0.1 0';31 $this->version = '1.0.11'; 32 32 } 33 33 $this->Integrai = 'integrai'; -
integrai/tags/1.0.11/integrai.php
r2579713 r2579767 17 17 * Plugin URI: https://github.com/integrai/woocommerce 18 18 * Description: Integração com os principais meios de pagamento e cálculo de frete para a sua plataforma de e-commerce WP WooCommerce. 19 * Version: 1.0.1 019 * Version: 1.0.11 20 20 * Author: Integrai 21 21 * Author URI: https://integrai.com.br … … 39 39 * Rename this for your plugin and update it as you release new versions. 40 40 */ 41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.1 0' );41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.11' ); 42 42 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 43 43 -
integrai/tags/1.0.11/public/class-integrai-public.php
r2579713 r2579767 216 216 } 217 217 218 private function get_product_categories ( $product_id ) { 219 $product_categories = array(); 220 $categories = get_the_terms( $product_id, 'product_cat' ); 221 222 foreach ( $categories as $category ) { 223 array_push($product_categories, $category->to_array()); 224 } 225 226 return $product_categories; 227 } 228 218 229 private function get_items( $order_id ) { 219 230 $order = wc_get_order( $order_id ); … … 224 235 225 236 array_push($products, array( 226 'id' => $item->get_ id(),237 'id' => $item->get_product_id(), 227 238 'sku' => $product->get_sku(), 228 239 'name' => $product->get_name(), … … 231 242 'price' => $order->get_line_total( $item, true, false ), 232 243 'weight' => $product->get_weight(), 244 'categories' => $this->get_product_categories( $item->get_product_id() ), 233 245 )); 234 246 } … … 393 405 $customer = $this->get_customer( $customer_id ); 394 406 395 return $this->get_api_helper()->send_event(self::NEW_CUSTOMER, $customer);396 397 407 return $this->get_api_helper()->send_event(self::SAVE_CUSTOMER, $customer); 398 408 } … … 447 457 if ( isset($order) && $order_enabled ) { 448 458 $full_order = $this->get_full_order( $order->get_id() ); 449 $response = $this->get_api_helper()->send_event(self::NEW_ORDER, $full_order); 450 451 if (isset($response) && $order_item_enabled) { 459 460 if ($order_item_enabled) { 452 461 $has_items = isset($full_order['items']) && !empty($full_order['items']); 453 462 $has_customer = isset($full_order['customer']) && !empty($full_order['customer']); … … 464 473 } 465 474 } 475 476 $this->get_api_helper()->send_event(self::NEW_ORDER, $full_order); 466 477 } 467 478 } -
integrai/tags/1.0.11/readme.txt
r2579713 r2579767 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.7 8 Stable tag: 1.0.1 08 Stable tag: 1.0.11 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
integrai/trunk/includes/class-integrai.php
r2579713 r2579767 29 29 $this->version = INTEGRAI_VERSION; 30 30 } else { 31 $this->version = '1.0.1 0';31 $this->version = '1.0.11'; 32 32 } 33 33 $this->Integrai = 'integrai'; -
integrai/trunk/integrai.php
r2579713 r2579767 17 17 * Plugin URI: https://github.com/integrai/woocommerce 18 18 * Description: Integração com os principais meios de pagamento e cálculo de frete para a sua plataforma de e-commerce WP WooCommerce. 19 * Version: 1.0.1 019 * Version: 1.0.11 20 20 * Author: Integrai 21 21 * Author URI: https://integrai.com.br … … 39 39 * Rename this for your plugin and update it as you release new versions. 40 40 */ 41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.1 0' );41 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI_VERSION', '1.0.11' ); 42 42 if ( ! defined( 'INTEGRAI__PLUGIN_DIR' ) ) define( 'INTEGRAI__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 43 43 -
integrai/trunk/public/class-integrai-public.php
r2579713 r2579767 216 216 } 217 217 218 private function get_product_categories ( $product_id ) { 219 $product_categories = array(); 220 $categories = get_the_terms( $product_id, 'product_cat' ); 221 222 foreach ( $categories as $category ) { 223 array_push($product_categories, $category->to_array()); 224 } 225 226 return $product_categories; 227 } 228 218 229 private function get_items( $order_id ) { 219 230 $order = wc_get_order( $order_id ); … … 224 235 225 236 array_push($products, array( 226 'id' => $item->get_ id(),237 'id' => $item->get_product_id(), 227 238 'sku' => $product->get_sku(), 228 239 'name' => $product->get_name(), … … 231 242 'price' => $order->get_line_total( $item, true, false ), 232 243 'weight' => $product->get_weight(), 244 'categories' => $this->get_product_categories( $item->get_product_id() ), 233 245 )); 234 246 } … … 393 405 $customer = $this->get_customer( $customer_id ); 394 406 395 return $this->get_api_helper()->send_event(self::NEW_CUSTOMER, $customer);396 397 407 return $this->get_api_helper()->send_event(self::SAVE_CUSTOMER, $customer); 398 408 } … … 447 457 if ( isset($order) && $order_enabled ) { 448 458 $full_order = $this->get_full_order( $order->get_id() ); 449 $response = $this->get_api_helper()->send_event(self::NEW_ORDER, $full_order); 450 451 if (isset($response) && $order_item_enabled) { 459 460 if ($order_item_enabled) { 452 461 $has_items = isset($full_order['items']) && !empty($full_order['items']); 453 462 $has_customer = isset($full_order['customer']) && !empty($full_order['customer']); … … 464 473 } 465 474 } 475 476 $this->get_api_helper()->send_event(self::NEW_ORDER, $full_order); 466 477 } 467 478 } -
integrai/trunk/readme.txt
r2579713 r2579767 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.7 8 Stable tag: 1.0.1 08 Stable tag: 1.0.11 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.