bookingactivities / booking-activities

Wordpress plugin booking system
GNU General Public License v3.0
29 stars 10 forks source link

Error with coupon #137

Closed rayedgar closed 2 years ago

rayedgar commented 2 years ago

It seems there is a conflict with smart coupons when order with BA generated applied coupon code is in cart.

I got the following error after cancellation a booking (backend and generated a coupon code) i made for cancelled customer a new order (another product not related), insert coupon code. No problem there. So when still in cart i went to the bookingactivities/booking section (backend) then i received this error. After finishing the order in front end, everything was fine again.

hope this helps:

Fatal error: Uncaught Error: Call to a member function get_cart() on null in /home/customer/www/staging29.hetamsterdamskleibedrijf.nl/public_html/wp-content/plugins/wt-smart-coupons-for-woocommerce/public/class-wt-smart-coupon-public.php:283 Stack trace: #0 /home/customer/www/staging29.hetamsterdamskleibedrijf.nl/public_html/wp-content/plugins/wt-smart-coupons-for-woocommerce/public/class-wt-smart-coupon-public.php(258): Wt_Smart_Coupon_Public->get_sub_total_of_matching_products(Object(WC_Coupon)) #1 /home/customer/www/staging29.hetamsterdamskleibedrijf.nl/public_html/wp-includes/class-wp-hook.php(309): Wt_Smart_Coupon_Public->wt_woocommerce_coupon_is_valid(true, Object(WC_Coupon)) #2 /home/customer/www/staging29.hetamsterdamskleibedrijf.nl/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters(true, Array) #3 /home/customer/www/staging29.hetamsterdamskleibedrijf.nl/public_html/wp-content/plugins/woocommerce/includes/class-wc-discounts.php(998): apply_filters('woocommerce_cou...', true, Object(WC_Coupon), Object( in /home/customer/www/staging29.hetamsterdamskleibedrijf.nl/public_html/wp-content/plugins/wt-smart-coupons-for-woocommerce/public/class-wt-smart-coupon-public.php on line 283

yoancutillas commented 2 years ago

Sorry but I cannot provide support for compatibility issues with third party plugins unfortunately. If you have followed the instructions below "Booking Activities doesn’t work as it should" here: https://booking-activities.fr/en/documentation/faq/ and identified that the conflict comes from wt-smart-coupons-for-woocommerce, then you will need to debug it or choose between both plugins.

rayedgar commented 2 years ago

Sorry, you are right. i actually do not need smart coupons anymore with you plugin :) because yours does exactly what we need.

yoancutillas commented 2 years ago

No problem, glad Booking Activities could meet those needs too!