Changeset 3466938
- Timestamp:
- 02/22/2026 03:32:28 PM (6 weeks ago)
- Location:
- voucherify/trunk
- Files:
-
- 9 edited
-
readme.txt (modified) (2 diffs)
-
src/Voucherify/Wordpress/Common/Helpers/Commons.php (modified) (2 diffs)
-
src/Voucherify/Wordpress/Discounts/Discounts.php (modified) (1 diff)
-
src/Voucherify/Wordpress/Discounts/DiscountsOrder.php (modified) (1 diff)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/InstalledVersions.php (modified) (3 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
-
voucherify.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
voucherify/trunk/readme.txt
r3241413 r3466938 7 7 WC tested up to: 9.4.2 8 8 WC requires at least: 5.3.3 9 Stable tag: 4.1. 09 Stable tag: 4.1.1 10 10 11 11 Integrates Voucherify API with woocommerce … … 49 49 50 50 == Changelog == 51 52 = 4.1.1 - 2026-02-22 = 53 * Fix: fatal error when processing order with line item that has no linked product 51 54 52 55 = 4.1.0 - 2025-02-12 = -
voucherify/trunk/src/Voucherify/Wordpress/Common/Helpers/Commons.php
r3241413 r3466938 295 295 $product = $item->get_product(); 296 296 297 if (in_array($product->get_type(), ['variation', 'subscription_variation'])) { 297 if (empty($product)) { 298 $sourceId = "line-item-" . $item->get_id(); 299 $relatedObject = 'product'; 300 } elseif (in_array($product->get_type(), ['variation', 'subscription_variation'])) { 298 301 $sourceId = createVcrfVariantSourceId($item->get_product_id()); 299 302 $relatedObject = 'sku'; … … 307 310 $itemProperties['quantity'] = $quantity; 308 311 $itemProperties['price'] = $price; 312 313 if (empty($product)) { 314 wc_get_logger()->info("Line item with empty product", ['source' => 'voucherify', "item" => $item->get_data(), "itemProperties" => $itemProperties]); 315 } 309 316 310 317 $items[] = $itemProperties; -
voucherify/trunk/src/Voucherify/Wordpress/Discounts/Discounts.php
r3241413 r3466938 210 210 private function is_taxable($item) 211 211 { 212 $is_taxable_product = $item->type == 'product' && $item->product->is_taxable(); 213 $is_taxable_shipping_or_fee = in_array($item->type, ['shipping', 'fee']) && $item->taxable; 214 215 return $is_taxable_product || $is_taxable_shipping_or_fee; 212 return in_array($item->type, ['shipping', 'fee', 'product']) && $item->taxable; 216 213 } 217 214 -
voucherify/trunk/src/Voucherify/Wordpress/Discounts/DiscountsOrder.php
r3241413 r3466938 36 36 37 37 foreach ($this->order->get_items() as $cart_item_key => $cartItem) { 38 /** @var \WC_Order_Item_Product $cartItem */ 38 39 $item = $this->get_default_item_props(); 39 40 $item->key = $cart_item_key; 40 41 $item->object = $cartItem; 41 $item->tax_class = $cartItem->get_ product()->get_tax_class();42 $item->taxable = 'taxable' === $cartItem->get_ product()->get_tax_status();42 $item->tax_class = $cartItem->get_tax_class(); 43 $item->taxable = 'taxable' === $cartItem->get_tax_status(); 43 44 $item->price_includes_tax = true; 44 45 $item->quantity = $cartItem->get_quantity(); 45 46 $item->product = $cartItem->get_product(); 46 $rates = WC_Tax::get_rates($cartItem->get_ product()->get_tax_class());47 $rates = WC_Tax::get_rates($cartItem->get_tax_class()); 47 48 $item->tax_rates = $rates; 48 49 $item->price = wc_add_number_precision_deep( -
voucherify/trunk/vendor/autoload.php
r3241413 r3466938 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 -
voucherify/trunk/vendor/composer/InstalledVersions.php
r3241413 r3466938 27 27 class InstalledVersions 28 28 { 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 29 35 /** 30 36 * @var mixed[]|null … … 324 330 325 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 341 } 342 343 /** 326 344 * @return array[] 327 345 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> … … 337 355 338 356 if (self::$canGetVendors) { 339 $selfDir = s trtr(__DIR__, '\\', '/');357 $selfDir = self::getSelfDir(); 340 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 341 359 $vendorDir = strtr($vendorDir, '\\', '/'); -
voucherify/trunk/vendor/composer/autoload_static.php
r3241413 r3466938 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'V' => 10 'V' => 11 11 array ( 12 12 'Voucherify\\Wordpress\\' => 21, … … 17 17 18 18 public static $prefixDirsPsr4 = array ( 19 'Voucherify\\Wordpress\\' => 19 'Voucherify\\Wordpress\\' => 20 20 array ( 21 21 0 => __DIR__ . '/../..' . '/src/Voucherify/Wordpress', 22 22 ), 23 'Voucherify\\Test\\Helpers\\' => 23 'Voucherify\\Test\\Helpers\\' => 24 24 array ( 25 25 0 => __DIR__ . '/..' . '/rspective/voucherify/test/helpers', 26 26 ), 27 'Voucherify\\' => 27 'Voucherify\\' => 28 28 array ( 29 29 0 => __DIR__ . '/../..' . '/src/Voucherify', -
voucherify/trunk/vendor/composer/installed.php
r3241413 r3466938 2 2 'root' => array( 3 3 'name' => '__root__', 4 'pretty_version' => '4.1. 0.x-dev',5 'version' => '4.1. 0.9999999-dev',6 'reference' => ' 241602cd0336883bba821232c510a0726117a364',4 'pretty_version' => '4.1.1.x-dev', 5 'version' => '4.1.1.9999999-dev', 6 'reference' => '320d67fc7d7c5c41ecf63869df188544adfe507e', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 '__root__' => array( 14 'pretty_version' => '4.1. 0.x-dev',15 'version' => '4.1. 0.9999999-dev',16 'reference' => ' 241602cd0336883bba821232c510a0726117a364',14 'pretty_version' => '4.1.1.x-dev', 15 'version' => '4.1.1.9999999-dev', 16 'reference' => '320d67fc7d7c5c41ecf63869df188544adfe507e', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../', -
voucherify/trunk/voucherify.php
r3241413 r3466938 8 8 * Plugin URI: https://wordpress.org/plugins/voucherify/ 9 9 * Description: Integrates Voucherify API with woocommerce replacing core coupons functionality 10 * Version: 4.1. 010 * Version: 4.1.1 11 11 * Author: rspective 12 12 * Author URI: https://www.rspective.com/
Note: See TracChangeset
for help on using the changeset viewer.