Skip to content

Commit 4322343

Browse files
github-actions[bot]bor0gedex
authored
[Backport to release/10.1] Fix an issue when a product is not an object (#60252)
Fix an issue when a product is not an object (#60215) * Fix an issue when a product is not an object * Update plugins/woocommerce/includes/admin/meta-boxes/views/html-order-item.php --------- Co-authored-by: Boro Sitnikovski <buritomath@gmail.com> Co-authored-by: Akeda Bagus <akeda.bagus@automattic.com>
1 parent 052a9e3 commit 4322343

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fix
3+
4+
Fix an issue when a product is not an object in html order item

plugins/woocommerce/includes/admin/meta-boxes/views/html-order-item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
?>
105105
</div>
106106
<?php
107-
$step = $product->get_purchase_quantity_step();
107+
$step = $product ? $product->get_purchase_quantity_step() : 1;
108108

109109
/**
110110
* Filter to change the product quantity stepping in the order editor of the admin area.

0 commit comments

Comments
 (0)