Changeset 3178013
- Timestamp:
- 10/29/2024 01:05:04 PM (17 months ago)
- Location:
- product-feeder
- Files:
-
- 11 added
- 3 edited
-
tags/3.0.0 (added)
-
tags/3.0.0/includes (added)
-
tags/3.0.0/includes/css (added)
-
tags/3.0.0/includes/css/product-feeder.css (added)
-
tags/3.0.0/includes/product-feeder.php (added)
-
tags/3.0.0/languages (added)
-
tags/3.0.0/languages/product-feeder-nl_NL.mo (added)
-
tags/3.0.0/languages/product-feeder-nl_NL.po (added)
-
tags/3.0.0/product-feeder.php (added)
-
tags/3.0.0/readme.txt (added)
-
tags/3.0.0/uninstall.php (added)
-
trunk/includes/product-feeder.php (modified) (4 diffs)
-
trunk/product-feeder.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
product-feeder/trunk/includes/product-feeder.php
r3174257 r3178013 326 326 if (($product->get_type() == 'simple' && $Item['VariationID'] == $Item['ProductID']) || in_array($Item['VariationID'], $product->get_children())) { 327 327 $variation = wc_get_product($Item['VariationID']); 328 if ($variation instanceof WC_Product) $ItemsToAddToOrder[] = array('Variation' => $variation, 'Quantity' => $Item['Quantity'] );328 if ($variation instanceof WC_Product) $ItemsToAddToOrder[] = array('Variation' => $variation, 'Quantity' => $Item['Quantity'], 'Price' => $Item['Price']); 329 329 else $Errors[] = array('Type' => 'VARIATION NOT FOUND', 'Variables' => array('Name' => $Item['Name'], 'Variant' => $Item['Variant'], 'ProductID' => $Item['ProductID'], 'VariationID' => $Item['VariationID'])); 330 330 } … … 362 362 'country' => $Order['Shipping']['CountryCode'] 363 363 ), 'shipping'); 364 foreach ($ItemsToAddToOrder as $ItemToAddToOrder) $order->add_product($ItemToAddToOrder['Variation'], $ItemToAddToOrder['Quantity']); 364 foreach ($ItemsToAddToOrder as $ItemToAddToOrder) { 365 $order->add_product($ItemToAddToOrder['Variation'], $ItemToAddToOrder['Quantity'], array( 366 'subtotal' => $ItemToAddToOrder['Price'] * $ItemToAddToOrder['Quantity'], 367 'total' => $ItemToAddToOrder['Price'] * $ItemToAddToOrder['Quantity'] 368 )); 369 } 365 370 $order->calculate_totals(); 366 371 $order->add_order_note(sprintf(__('Order %s from marketplace %s with a total price of %s is created by Product Feeder through channel %d - %s', 'product-feeder'), $Order['ID'], $JSON['Marketplace']['Name'], strip_tags(wc_price($JSON['Order']['Price']['Amount'], array('currency' => $JSON['Order']['Price']['Currency']))), $JSON['Channel']['ID'], $JSON['Channel']['Name'])); 372 $order->add_meta_data('_wc_order_attribution_source_type', 'utm'); 373 $order->add_meta_data('_wc_order_attribution_utm_source', $JSON['Marketplace']['Name'].' - Product Feeder'); 367 374 update_post_meta($OrderID, 'product_feeder_order', $Order['ID']); 368 375 update_post_meta($OrderID, 'product_feeder_marketplace', $JSON['Marketplace']['Name']); 369 376 $order->update_status($DefaultOrderStatus, '', true); 377 $order->save(); 370 378 $this->APISuccess(array('OrderID' => $OrderID)); 371 379 } … … 461 469 $order->calculate_totals(); 462 470 $order->add_order_note(sprintf(__('Changed order %s from marketplace %s with a total price of %s is synchronized by Product Feeder through channel %d - %s', 'product-feeder'), $OrderID, $JSON['Marketplace']['Name'], strip_tags(wc_price($JSON['Order']['Price']['Amount'], array('currency' => $JSON['Order']['Price']['Currency']))), $JSON['Channel']['ID'], $JSON['Channel']['Name'])); 471 $order->save(); 463 472 } 464 473 $this->APISuccess(); … … 489 498 else $order->update_status($RejectedOrderStatuses[0], '', true); 490 499 $order->add_order_note(sprintf(__('Rejected order %s from marketplace %s is synchronized by Product Feeder through channel %d - %s', 'product-feeder'), $OrderID, $JSON['Marketplace']['Name'], $JSON['Channel']['ID'], $JSON['Channel']['Name'])); 500 $order->save(); 491 501 $this->APISuccess(); 492 502 } -
product-feeder/trunk/product-feeder.php
r3174257 r3178013 5 5 * Plugin URI: https://product-feeder.com/nl/sources/wordpress-woocommerce 6 6 * Description: Connect with various marketplaces for automated synchronization of products, orders and returns! Try it now at https://product-feeder.com 7 * Version: 2.6.57 * Version: 3.0.0 8 8 * Author: Product Feeder 9 9 * Author URI: https://product-feeder.com -
product-feeder/trunk/readme.txt
r3176732 r3178013 5 5 Requires at least: 6.0 6 6 Tested up to: 6.7 7 Stable tag: 2.6.57 Stable tag: 3.0.0 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later … … 165 165 = 2.6.5 = 166 166 * Updated order handling for simple product 167 168 = 3.0.0 = 169 * Added marketplace pricing and origin
Note: See TracChangeset
for help on using the changeset viewer.