WPIntell

Source evidence

Integration with the Deposit plugin

Easy Booking – WooCommerce Booking & Reservation Plugin · support · 2025-03-12T20:39:00+00:00

complaintsentiment
highseverity
0.96relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 36 rows with source links

19.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Niloy – Codeixer unresolved
Hi @morki , I am the author of this deposit plugin https://wordpress.org/plugins/deposits-for-woocommerce/ We have a user who is using this plugin along with our plugin, and it has caused a conflict. you are using a filter to display the booking meta in order items using this code add_filter( 'woocommerce_display_item_meta', array( $this, 'display_booking_dates_in_checkout' ), 10, 3 ); The error occurs with partial payments when we create child orders that contain no products; instead, we only apply a fee to allow customers to pay the remaining balance. The code you implemented triggers an error because these child orders lack any associated products. To address this issue, simply include the following condition before line 90. includes / common / class-wceb-checkout.php $order_type = $item->get_order()->get_type(); // fix conflict with deposit plugin: https://wordpress.org/plugins/deposits-for-woocommerce/ if ( 'shop_deposit' === $order_type ) { return $html; } $product = $item->get_product(); Alternatively, you can include a action that allows other plugin developers to set conditions. At present, I manually apply this fix to the client’s website, but as you know, any modifications will be overwritten with a plugin update. Thanks, Niloy This topic was modified 1 year, 2 months ago by Niloy - Codeixer . Hi! Thank you for reporting the issue and providing a solution. Would the following code work instead of yours? $product = $item->get_product(); if ( ! is_a( $product, 'WC_Product' ) ) { return $html; } If not, I think I will opt for the action hook, as I’m not so inclined to add code for very specific plugins (apart from WooCommerce ones). Please keep me informed 🙂 Regards, Natasha It does not solve the issue because $product = $item->get_product(); is a throw error since the order does not have any items. Allright, what about this? $product = is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : false; if ( ! $product ) { return $html; }

Comments

3 shown
Ashanna 2025-03-13T08:03:00+00:00

Hi! Thank you for reporting the issue and providing a solution. Would the following code work instead of yours? $product = $item->get_product(); if ( ! is_a( $product, 'WC_Product' ) ) { return $html; } If not, I think I will opt for the action hook, as I’m not so inclined to add code for very specific plugins (apart from WooCommerce ones). Please keep me informed 🙂 Regards, Natasha

Niloy – Codeixer 2025-03-13T17:57:00+00:00

It does not solve the issue because $product = $item->get_product(); is a throw error since the order does not have any items.

Ashanna 2025-03-18T07:33:00+00:00

Allright, what about this? $product = is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : false; if ( ! $product ) { return $html; }