Plugin Directory

Changeset 2380272


Ignore:
Timestamp:
09/13/2020 09:07:26 AM (6 years ago)
Author:
jank404
Message:

v1.1.10

Location:
apollo/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apollo/trunk/apollo.php

    r2357549 r2380272  
    44 * Plugin URI:        https://wordpress.org/plugins/apollo
    55 * Description:       Manually or automatically generate invoices and send PDFs as attachments for WooCommerce orders.
    6  * Version:           1.1.9
     6 * Version:           1.1.10
    77 * Author:            Studio404
    88 * Text Domain:       apollo
     
    1414defined( 'ABSPATH' ) or exit;
    1515
    16 define( 'APOLLO_VERSION', '1.1.9' );
     16define( 'APOLLO_VERSION', '1.1.10' );
    1717
    1818function apollo_load_plugin() {
  • apollo/trunk/includes/admin/invoice.php

    r2357549 r2380272  
    5959        $tax_items_rates[$tax_item->get_rate_id()] = $tax_item->get_rate_percent();
    6060      }
    61    
     61     
    6262      // get data for each item
    6363      foreach ($order->get_items() as $item_id => $item_data) {
    6464        $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
    6673        $without_tax = floatval($product['total']) / $product['quantity'];
    6774        $tax_amount = floatval($product['total_tax']) / $product['quantity'];
    6875        $tax_percent = 0;
    6976
     77       
    7078        if($tax_amount > 0) {
    7179          $taxes = $item_data->get_taxes();
     
    8694
    8795        $sku = $productData->get_sku();
     96        // error_log( print_r($sku, TRUE) );
    8897
    8998        // add SKU code if item has one
  • apollo/trunk/readme.txt

    r2357549 r2380272  
    8585
    8686== Changelog ==
     87= 1.1.10 - September 13, 2020 =
     88
     89- Fixed: Variable product data fetching fix
     90
    8791= 1.1.9 - August 11, 2020 =
    8892
Note: See TracChangeset for help on using the changeset viewer.