Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical error on the Rates tab in the Product Editor #471

Open
ariel-maidana opened this issue Nov 12, 2024 · 2 comments
Open

Critical error on the Rates tab in the Product Editor #471

ariel-maidana opened this issue Nov 12, 2024 · 2 comments
Assignees
Labels
needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.

Comments

@ariel-maidana
Copy link

ariel-maidana commented Nov 12, 2024

Trying to edit the rate on an accommodation product is throwing a critical error.

Steps to reproduce:

  1. Create an Acommodation product.
  2. Click on the Rates tab.
  3. Try to edit the rates.
  4. See issue:

Image

Error log:

[12-Nov-2024 20:47:09 UTC] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: float - string in /srv/htdocs/wp-content/plugins/woocommerce-accommodation-bookings/includes/admin/views/html-accommodation-booking-rates-fields.php:117
Stack trace:
#0 /srv/htdocs/wp-content/plugins/woocommerce-accommodation-bookings/includes/admin/views/html-accommodation-booking-rates.php(46): include()
#1 /srv/htdocs/wp-content/plugins/woocommerce-accommodation-bookings/includes/admin/class-wc-accommodation-booking-admin-panels.php(95): include('/srv/htdocs/wp-...')
#2 /wordpress/core/6.6.2/wp-includes/class-wp-hook.php(324): WC_Accommodation_Booking_Admin_Panels->panels('')
#3 /wordpress/core/6.6.2/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /wordpress/core/6.6.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /wordpress/plugins/woocommerce/9.4.1/includes/admin/meta-boxes/views/html-product-data-panel.php(54): do_action('woocommerce_pro...')
#6 /wordpress/plugins/woocommerce/9.4.1/includes/admin/meta-boxes/class-wc-meta-box-product-data.php(33): include('/wordpress/plug...')
#7 /wordpress/core/6.6.2/wp-admin/includes/template.php(1456): WC_Meta_Box_Product_Data::output(Object(WP_Post), Array)
#8 /wordpress/core/6.6.2/wp-admin/edit-form-advanced.php(723): do_meta_boxes(Object(WP_Screen), 'normal', Object(WP_Post))
#9 /wordpress/core/6.6.2/wp-admin/post.php(206): require('/wordpress/core...')
#10 {main}
  thrown in /srv/htdocs/wp-content/plugins/woocommerce-accommodation-bookings/includes/admin/views/html-accommodation-booking-rates-fields.php on line 117

All plugins were inactive, except:

  • Jetpack
  • Akismet
  • WooCommerce
  • WooCommerce Bookings
  • WooCommerce Accommodation Bookings

Theme: Storefront.

Context: 9001179-zd-a8c

@ariel-maidana
Copy link
Author

I noticed that the product where the error is happening has a negative rate for a range. I asked the site owner to edit it to a non-negative number to see if that solves it for the affected product.

@vikrampm1 vikrampm1 added priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug. labels Nov 13, 2024
@iamdharmesh
Copy link
Member

Hi @ariel-maidana,

Thank you for reporting the issue. Could you please provide detailed steps to reproduce the issue, along with the PHP version and plugin version? I attempted to reproduce the issue, but I was unable to replicate it on my end.

Thank you.

@iamdharmesh iamdharmesh self-assigned this Dec 23, 2024
@iamdharmesh iamdharmesh added the needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: author feedback The issue/PR needs a response from any of the parties involved in the issue. priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants