Changeset 2415367
- Timestamp:
- 11/09/2020 06:34:10 PM (5 years ago)
- Location:
- apollo/trunk
- Files:
-
- 3 edited
-
apollo.php (modified) (2 diffs)
-
includes/admin/invoice.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
apollo/trunk/apollo.php
r2414415 r2415367 4 4 * Plugin URI: https://wordpress.org/plugins/apollo 5 5 * Description: Manually or automatically generate invoices and send PDFs as attachments for WooCommerce orders. 6 * Version: 1.1.1 26 * Version: 1.1.13 7 7 * Author: Studio404 8 8 * Text Domain: apollo … … 14 14 defined( 'ABSPATH' ) or exit; 15 15 16 define( 'APOLLO_VERSION', '1.1.1 2' );16 define( 'APOLLO_VERSION', '1.1.13' ); 17 17 18 18 function apollo_load_plugin() { -
apollo/trunk/includes/admin/invoice.php
r2414415 r2415367 79 79 80 80 if($tax_amount > 0) { 81 $taxes = $item_data->get_taxes() ;82 $tax_rate_id = key($taxes['subtotal'] ) ?? false;81 $taxes = $item_data->get_taxes() ?? []; 82 $tax_rate_id = key($taxes['subtotal'] ?? $taxes['total'] ?? []) ?? false; 83 83 $tax_rate_percentage = $tax_items_rates[$tax_rate_id] ?? false; 84 84 … … 96 96 97 97 $sku = $productData->get_sku(); 98 // error_log( print_r($sku, TRUE) ); 98 99 99 100 // add SKU code if item has one … … 132 133 133 134 if($tax_amount > 0) { 134 $taxes = $item_shipping->get_taxes() ;135 $tax_rate_id = key($taxes['subtotal'] ) ?? false;135 $taxes = $item_shipping->get_taxes() ?? []; 136 $tax_rate_id = key($taxes['subtotal'] ?? $taxes['total'] ?? []) ?? false; 136 137 $tax_rate_percentage = $tax_items_rates[$tax_rate_id] ?? false; 137 138 … … 161 162 162 163 if($tax_amount > 0) { 163 $taxes = $item_fee->get_taxes() ;164 $tax_rate_id = key($taxes['subtotal'] ) ?? false;164 $taxes = $item_fee->get_taxes() ?? []; 165 $tax_rate_id = key($taxes['subtotal'] ?? $taxes['total'] ?? []) ?? false; 165 166 $tax_rate_percentage = $tax_items_rates[$tax_rate_id] ?? false; 166 167 … … 211 212 } 212 213 214 // error_log( print_r($order_data, TRUE) ); 213 215 // if fiscalization is enabled and we making invoice, add the fiscalization data 214 216 if ($fiscalization && $type === 'invoice') { -
apollo/trunk/readme.txt
r2414415 r2415367 85 85 86 86 == Changelog == 87 = 1.1.13 - November 9, 2020 = 88 89 - Fixed: Shipping tax rate calculation 90 87 91 = 1.1.12 - November 7, 2020 = 88 92
Note: See TracChangeset
for help on using the changeset viewer.