Changeset 2552677
- Timestamp:
- 06/23/2021 12:13:20 PM (5 years ago)
- Location:
- appmax-woocommerce
- Files:
-
- 4 added
- 3 edited
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.png (added)
-
assets/icon-128x128.png (added)
-
assets/icon-256x256.png (added)
-
trunk/appmax-woocommerce.php (modified) (2 diffs)
-
trunk/includes/class-awc-api.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
appmax-woocommerce/trunk/appmax-woocommerce.php
r2533270 r2552677 3 3 * Plugin Name: AppMax WooCommerce 4 4 * Description: Gateway de pagamento AppMax para WooCommerce. 5 * Version: 2.0. 395 * Version: 2.0.40 6 6 * License: GPLv2 or later 7 7 * Author: AppMax Plataforma de Vendas Ltda … … 24 24 class AppMax_WC 25 25 { 26 const VERSION = '2.0. 39';26 const VERSION = '2.0.40'; 27 27 28 28 /** -
appmax-woocommerce/trunk/includes/class-awc-api.php
r2529290 r2552677 241 241 * @param $interest 242 242 * @return array 243 * @throws Exception 243 244 */ 244 245 private function awc_get_products_cart( $interest ) … … 336 337 private function awc_get_information_product_variation( $skuParentProduct, $values ) 337 338 { 338 $variation = wc_get_product( $values['variation_id']);339 $variation = wc_get_product( $values['variation_id'] ); 339 340 340 341 return [ … … 368 369 * @param $values 369 370 * @return array 371 * @throws Exception 370 372 */ 371 373 private function awc_get_current_product( $values ) … … 373 375 $product = wc_get_product( $values['product_id'] ); 374 376 375 if (empty($values['variation_id']) && count($values['variation']) == 0) { 377 if ( ! $product->get_sku() ) { 378 throw new \Exception( "Produto do carrinho {$product->get_title()} não possui SKU registrado." ); 379 } 380 381 if ( empty( $values['variation_id'] ) && count( $values['variation'] ) == 0 ) { 376 382 return $this->awc_get_information_product( $product, $values ); 377 383 } … … 388 394 public function awc_post_tracking_code( $order_id, $tracking_code ) 389 395 { 390 $data = $this->make_tracking_code_body( $order_id, $tracking_code);396 $data = $this->make_tracking_code_body( $order_id, $tracking_code ); 391 397 392 398 return $this->awc_post( $this->awc_get_full_url( AWC_Suffix_Api::AWS_SUFFIX_TRACKING_CODE ), $data ); … … 399 405 * @return array 400 406 */ 401 private function make_tracking_code_body( $order_id, $tracking_code)407 private function make_tracking_code_body( $order_id, $tracking_code ) 402 408 { 403 409 return [ -
appmax-woocommerce/trunk/readme.txt
r2533270 r2552677 4 4 Requires at least: 4.0 5 5 Tested up to: 5.1 6 Stable tag: 2.0. 396 Stable tag: 2.0.40 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 117 117 == Changelog == 118 118 119 = 2.0.40 = 120 121 * Validação que checa se o produto da loja tem sku antes de enviar o carrinho. 122 119 123 = 2.0.39 = 120 124
Note: See TracChangeset
for help on using the changeset viewer.