Changeset 2380272
- Timestamp:
- 09/13/2020 09:07:26 AM (6 years ago)
- Location:
- apollo/trunk
- Files:
-
- 3 edited
-
apollo.php (modified) (2 diffs)
-
includes/admin/invoice.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
apollo/trunk/apollo.php
r2357549 r2380272 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. 96 * Version: 1.1.10 7 7 * Author: Studio404 8 8 * Text Domain: apollo … … 14 14 defined( 'ABSPATH' ) or exit; 15 15 16 define( 'APOLLO_VERSION', '1.1. 9' );16 define( 'APOLLO_VERSION', '1.1.10' ); 17 17 18 18 function apollo_load_plugin() { -
apollo/trunk/includes/admin/invoice.php
r2357549 r2380272 59 59 $tax_items_rates[$tax_item->get_rate_id()] = $tax_item->get_rate_percent(); 60 60 } 61 61 62 62 // get data for each item 63 63 foreach ($order->get_items() as $item_id => $item_data) { 64 64 $product = $item_data->get_data(); 65 $productData = wc_get_product($item_data->get_product_id()); 65 $product_variation_id = $item_data['variation_id']; 66 67 if ($product_variation_id) { 68 $productData = wc_get_product($item_data['variation_id']); 69 } else { 70 $productData = wc_get_product($item_data['product_id']); 71 } 72 66 73 $without_tax = floatval($product['total']) / $product['quantity']; 67 74 $tax_amount = floatval($product['total_tax']) / $product['quantity']; 68 75 $tax_percent = 0; 69 76 77 70 78 if($tax_amount > 0) { 71 79 $taxes = $item_data->get_taxes(); … … 86 94 87 95 $sku = $productData->get_sku(); 96 // error_log( print_r($sku, TRUE) ); 88 97 89 98 // add SKU code if item has one -
apollo/trunk/readme.txt
r2357549 r2380272 85 85 86 86 == Changelog == 87 = 1.1.10 - September 13, 2020 = 88 89 - Fixed: Variable product data fetching fix 90 87 91 = 1.1.9 - August 11, 2020 = 88 92
Note: See TracChangeset
for help on using the changeset viewer.