Changeset 2544369
- Timestamp:
- 06/08/2021 02:23:06 PM (5 years ago)
- Location:
- aplazame
- Files:
-
- 8 edited
- 1 copied
-
tags/3.4.1 (copied) (copied from aplazame/trunk)
-
tags/3.4.1/README.txt (modified) (2 diffs)
-
tags/3.4.1/aplazame.php (modified) (2 diffs)
-
tags/3.4.1/i18n/languages/aplazame.pot (modified) (1 diff)
-
tags/3.4.1/lib/Aplazame/Aplazame/BusinessModel/Article.php (modified) (1 diff)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/aplazame.php (modified) (2 diffs)
-
trunk/i18n/languages/aplazame.pot (modified) (1 diff)
-
trunk/lib/Aplazame/Aplazame/BusinessModel/Article.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
aplazame/tags/3.4.1/README.txt
r2536486 r2544369 5 5 Tested up to: 5.7.2 6 6 Requires PHP: 5.3.0 7 Stable tag: 3.4. 07 Stable tag: 3.4.1 8 8 License: BSD-3-Clause 9 9 License URI: https://github.com/aplazame/woocommerce/blob/master/LICENSE … … 78 78 == Changelog == 79 79 80 #### [v3.4.1](https://github.com/aplazame/woocommerce/tree/v3.4.1) (2021-06-08) 81 82 * [FIX] Retrocompatibility issue at article model. 83 80 84 #### [v3.4.0](https://github.com/aplazame/woocommerce/tree/v3.4.0) (2021-05-24) 81 85 -
aplazame/tags/3.4.1/aplazame.php
r2536486 r2544369 3 3 * Plugin Name: Aplazame 4 4 * Plugin URI: https://github.com/aplazame/woocommerce 5 * Version: 3.4. 05 * Version: 3.4.1 6 6 * Description: Aplazame offers a payment method to receive funding for the purchases. 7 7 * Author: Aplazame … … 26 26 27 27 class WC_Aplazame { 28 const VERSION = '3.4. 0';28 const VERSION = '3.4.1'; 29 29 const METHOD_ID = 'aplazame'; 30 30 const METHOD_TITLE = 'Aplazame'; -
aplazame/tags/3.4.1/i18n/languages/aplazame.pot
r2536486 r2544369 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: Aplazame v3.4. 0\n"9 "Project-Id-Version: Aplazame v3.4.1\n" 10 10 "Report-Msgid-Bugs-To: https://github.com/aplazame/woocommerce\n" 11 "POT-Creation-Date: 2021-0 5-24 13:21+0000\n"11 "POT-Creation-Date: 2021-06-08 14:18+0000\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
aplazame/tags/3.4.1/lib/Aplazame/Aplazame/BusinessModel/Article.php
r2454923 r2544369 15 15 16 16 public static function createFromOrderItemArray( array $values ) { 17 $product = new WC_Product( $values['product_id'] ); 18 $quantity = (int) $values['qty']; 19 $price = $values['line_subtotal'] / $values['qty']; 20 $tax_rate = $values['line_tax'] ? 100 * ( $values['line_tax'] / $values['line_total'] ) : 0; 17 $productId = $values['product_id']; 18 $product = new WC_Product( $productId ); 19 $quantity = (int) $values['qty']; 20 $price = $values['line_subtotal'] / $values['qty']; 21 $tax_rate = $values['line_tax'] ? 100 * ( $values['line_tax'] / $values['line_total'] ) : 0; 21 22 22 return self::createArticle( $product, $ quantity, $price, $tax_rate );23 return self::createArticle( $product, $productId, $quantity, $price, $tax_rate ); 23 24 } 24 25 25 26 public static function createFromOrderItemProduct( WC_Order_Item_Product $item_product ) { 26 $product = new WC_Product( $item_product->get_product_id() ); 27 $quantity = (int) $item_product->get_quantity(); 28 $price = $item_product->get_subtotal() / $item_product->get_quantity(); 29 $tax_rate = $item_product->get_total_tax() ? 100 * ( $item_product->get_total_tax() / $item_product->get_total() ) : 0; 27 $product = $item_product->get_product(); 28 $productId = $product->get_id(); 29 $quantity = (int) $item_product->get_quantity(); 30 $price = $item_product->get_subtotal() / $item_product->get_quantity(); 31 $tax_rate = $item_product->get_total_tax() ? 100 * ( $item_product->get_total_tax() / $item_product->get_total() ) : 0; 30 32 31 return self::createArticle( $product, $ quantity, $price, $tax_rate );33 return self::createArticle( $product, $productId, $quantity, $price, $tax_rate ); 32 34 } 33 35 34 private static function createArticle( WC_Product $product, $quantity, $price, $tax_rate ) { 35 $aArticle = new self(); 36 $aArticle->id = $product->get_id() ? $product->get_id() : null; 37 38 $sku = $product->get_sku(); 39 if ( ! empty( $sku ) ) { 40 $aArticle->sku = $sku; 41 } 42 43 $aArticle->name = $product->get_title() ? $product->get_title() : null; 44 $aArticle->url = $product->get_permalink() ? $product->get_permalink() : null; 36 private static function createArticle( $product, $productId, $quantity, $price, $tax_rate ) { 37 $aArticle = new self(); 38 $aArticle->id = $productId; 39 $aArticle->sku = $product->get_sku(); 40 $aArticle->name = $product->get_title(); 41 $aArticle->url = $product->get_permalink(); 45 42 $aArticle->quantity = $quantity; 46 43 $aArticle->price = Aplazame_Sdk_Serializer_Decimal::fromFloat( $price ); -
aplazame/trunk/README.txt
r2536486 r2544369 5 5 Tested up to: 5.7.2 6 6 Requires PHP: 5.3.0 7 Stable tag: 3.4. 07 Stable tag: 3.4.1 8 8 License: BSD-3-Clause 9 9 License URI: https://github.com/aplazame/woocommerce/blob/master/LICENSE … … 78 78 == Changelog == 79 79 80 #### [v3.4.1](https://github.com/aplazame/woocommerce/tree/v3.4.1) (2021-06-08) 81 82 * [FIX] Retrocompatibility issue at article model. 83 80 84 #### [v3.4.0](https://github.com/aplazame/woocommerce/tree/v3.4.0) (2021-05-24) 81 85 -
aplazame/trunk/aplazame.php
r2536486 r2544369 3 3 * Plugin Name: Aplazame 4 4 * Plugin URI: https://github.com/aplazame/woocommerce 5 * Version: 3.4. 05 * Version: 3.4.1 6 6 * Description: Aplazame offers a payment method to receive funding for the purchases. 7 7 * Author: Aplazame … … 26 26 27 27 class WC_Aplazame { 28 const VERSION = '3.4. 0';28 const VERSION = '3.4.1'; 29 29 const METHOD_ID = 'aplazame'; 30 30 const METHOD_TITLE = 'Aplazame'; -
aplazame/trunk/i18n/languages/aplazame.pot
r2536486 r2544369 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: Aplazame v3.4. 0\n"9 "Project-Id-Version: Aplazame v3.4.1\n" 10 10 "Report-Msgid-Bugs-To: https://github.com/aplazame/woocommerce\n" 11 "POT-Creation-Date: 2021-0 5-24 13:21+0000\n"11 "POT-Creation-Date: 2021-06-08 14:18+0000\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
aplazame/trunk/lib/Aplazame/Aplazame/BusinessModel/Article.php
r2454923 r2544369 15 15 16 16 public static function createFromOrderItemArray( array $values ) { 17 $product = new WC_Product( $values['product_id'] ); 18 $quantity = (int) $values['qty']; 19 $price = $values['line_subtotal'] / $values['qty']; 20 $tax_rate = $values['line_tax'] ? 100 * ( $values['line_tax'] / $values['line_total'] ) : 0; 17 $productId = $values['product_id']; 18 $product = new WC_Product( $productId ); 19 $quantity = (int) $values['qty']; 20 $price = $values['line_subtotal'] / $values['qty']; 21 $tax_rate = $values['line_tax'] ? 100 * ( $values['line_tax'] / $values['line_total'] ) : 0; 21 22 22 return self::createArticle( $product, $ quantity, $price, $tax_rate );23 return self::createArticle( $product, $productId, $quantity, $price, $tax_rate ); 23 24 } 24 25 25 26 public static function createFromOrderItemProduct( WC_Order_Item_Product $item_product ) { 26 $product = new WC_Product( $item_product->get_product_id() ); 27 $quantity = (int) $item_product->get_quantity(); 28 $price = $item_product->get_subtotal() / $item_product->get_quantity(); 29 $tax_rate = $item_product->get_total_tax() ? 100 * ( $item_product->get_total_tax() / $item_product->get_total() ) : 0; 27 $product = $item_product->get_product(); 28 $productId = $product->get_id(); 29 $quantity = (int) $item_product->get_quantity(); 30 $price = $item_product->get_subtotal() / $item_product->get_quantity(); 31 $tax_rate = $item_product->get_total_tax() ? 100 * ( $item_product->get_total_tax() / $item_product->get_total() ) : 0; 30 32 31 return self::createArticle( $product, $ quantity, $price, $tax_rate );33 return self::createArticle( $product, $productId, $quantity, $price, $tax_rate ); 32 34 } 33 35 34 private static function createArticle( WC_Product $product, $quantity, $price, $tax_rate ) { 35 $aArticle = new self(); 36 $aArticle->id = $product->get_id() ? $product->get_id() : null; 37 38 $sku = $product->get_sku(); 39 if ( ! empty( $sku ) ) { 40 $aArticle->sku = $sku; 41 } 42 43 $aArticle->name = $product->get_title() ? $product->get_title() : null; 44 $aArticle->url = $product->get_permalink() ? $product->get_permalink() : null; 36 private static function createArticle( $product, $productId, $quantity, $price, $tax_rate ) { 37 $aArticle = new self(); 38 $aArticle->id = $productId; 39 $aArticle->sku = $product->get_sku(); 40 $aArticle->name = $product->get_title(); 41 $aArticle->url = $product->get_permalink(); 45 42 $aArticle->quantity = $quantity; 46 43 $aArticle->price = Aplazame_Sdk_Serializer_Decimal::fromFloat( $price );
Note: See TracChangeset
for help on using the changeset viewer.