Merge pull request #5927 from claudiosmweb/fix-need-processing-filter
fixed the woocommerce_order_item_needs_processing filter, closes #5877
This commit is contained in:
commit
a45ff0b6de
|
@ -2072,7 +2072,6 @@ abstract class WC_Abstract_Order {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function payment_complete( $transaction_id = '' ) {
|
public function payment_complete( $transaction_id = '' ) {
|
||||||
|
|
||||||
do_action( 'woocommerce_pre_payment_complete', $this->id );
|
do_action( 'woocommerce_pre_payment_complete', $this->id );
|
||||||
|
|
||||||
if ( ! empty( WC()->session->order_awaiting_payment ) ) {
|
if ( ! empty( WC()->session->order_awaiting_payment ) ) {
|
||||||
|
@ -2093,7 +2092,7 @@ abstract class WC_Abstract_Order {
|
||||||
|
|
||||||
$_product = $this->get_product_from_item( $item );
|
$_product = $this->get_product_from_item( $item );
|
||||||
|
|
||||||
if ( false !== $_product && ( $_product->is_downloadable() && $_product->is_virtual() ) || ! apply_filters( 'woocommerce_order_item_needs_processing', true, $_product, $this->id ) ) {
|
if ( false !== $_product && ! apply_filters( 'woocommerce_order_item_needs_processing', ! ( $_product->is_downloadable() && $_product->is_virtual() ), $_product, $this->id ) ) {
|
||||||
$order_needs_processing = false;
|
$order_needs_processing = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue