Integration with the Deposit plugin
-
Hi @morki ,
I am the author of this deposit plugin https://ww.wp.xz.cn/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://ww.wp.xz.cn/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
The topic ‘Integration with the Deposit plugin’ is closed to new replies.