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

Compatibility with YITH Booking and Appointment #7950

Open
WillBrubaker opened this issue Dec 29, 2023 · 6 comments · May be fixed by #10031
Open

Compatibility with YITH Booking and Appointment #7950

WillBrubaker opened this issue Dec 29, 2023 · 6 comments · May be fixed by #10031
Assignees
Labels
focus: woopay 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

@WillBrubaker
Copy link

WillBrubaker commented Dec 29, 2023

Describe the bug

With Woo Payments version >= 6.9, a fatal error is thrown when it is activated when YITH Booking and Appointment for WooCommerce Premium is active.

7504030-zen

To Reproduce

  1. YITH Booking and Appointment for WooCommerce Premium is an active plugin
  2. Activate Woo Payments
  3. Fatal error occurs

I reckon YITH uses the same product type but doesn't provide this method.

Actual behavior

2023-12-27T01:46:58+00:00 CRITICAL Uncaught Error: Call to undefined method WC_Product_Booking::get_requires_confirmation() in /home3/dinerore/public_html/wp-content/plugins/woocommerce-payments/includes/class-wc-payments-woopay-button-handler.php:652
Stack trace:
#0 /home3/dinerore/public_html/wp-content/plugins/woocommerce-payments/includes/class-wc-payments-woopay-button-handler.php(560): WC_Payments_WooPay_Button_Handler->is_product_supported()
#1 /home3/dinerore/public_html/wp-content/plugins/woocommerce-payments/includes/class-wc-payments-woopay-button-handler.php(154): WC_Payments_WooPay_Button_Handler->should_show_woopay_button()
#2 /home3/dinerore/public_html/wp-includes/class-wp-hook.php(324): WC_Payments_WooPay_Button_Handler->scripts('')
#3 /home3/dinerore/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /home3/dinerore/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /home3/dinerore/public_html/wp-includes/script-loader.php(2262): do_action('wp_enqueue_scri...')
#6 /home3/dinerore/public_html/wp-includes/class-wp-hook.php(324): wp_enqueue_scripts('')
#7 /home3/dinerore/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#8 /home3/dinerore/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /home3/dinerore/public_html/wp-includes/general-template.php(3052): do_action('wp_head')
#10 /home3/dinerore/public_html/wp-content/themes/laundry/header-2.php(8): wp_head()
#11 /home3/dinerore/public_html/wp-includes/template.php(790): require_once('/home3/dinerore...')
#12 /home3/dinerore/public_html/wp-includes/template.php(725): load_template('/home3/dinerore...', true, Array)
#13 /home3/dinerore/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#14 /home3/dinerore/public_html/wp-content/themes/laundry/single.php(1): get_header('2')
#15 /home3/dinerore/public_html/wp-includes/template-loader.php(106): include('/home3/dinerore...')
#16 /home3/dinerore/public_html/wp-blog-header.php(19): require_once('/home3/dinerore...')
#17 /home3/dinerore/public_html/index.php(17): require('/home3/dinerore...')
#18 {main}
  thrown in /home3/dinerore/public_html/wp-content/plugins/woocommerce-payments/includes/class-wc-payments-woopay-button-handler.php on line 652

Screenshots

Expected behavior

To be able to activate Woo Payments

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

@WillBrubaker WillBrubaker added the type: bug The issue is a confirmed bug. label Dec 29, 2023
@csmcneill
Copy link
Contributor

Flagging this to @hsingyuc since they've been working on WooPay <> Bookings compatibility a bit (see pdpOw2-2d5-p2 and pdpOw2-2sP-p2), which seems to be what this is related to.

cc @pierorocca

@hsingyuc
Copy link
Contributor

hsingyuc commented Jan 1, 2024

Can someone explain to me what's YITH?

@csmcneill
Copy link
Contributor

YITH is an independent seller of WooCommerce-related plugins: https://yithemes.com/

This issue is related to this specific product: https://yithemes.com/themes/plugins/yith-woocommerce-booking/

@haszari haszari added the focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). label Mar 11, 2024
@vbelolapotkov vbelolapotkov added focus: woopay and removed focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). labels Dec 14, 2024
@vbelolapotkov
Copy link
Collaborator

@c-shultz this one looks like WooPay specific, so sending to your teams maintenance backlog. I've assigned the issue to you for this, please take care of adding it to the team board.

@pierorocca pierorocca added the priority: high The issue/PR is high priority—it affects lots of customers substantially, but not critically. label Dec 19, 2024
@alefesouza
Copy link
Member

I see this plugin uses the same WC_Product_Booking class name used by WooCommerce Bookings plugin but their version does not have the get_requires_confirmation method.

I think a simple check extra check (method_exists( $product, 'get_requires_confirmation' )) is enough to fix this issue but I wonder if it's okay to push a PR without testing instructions or we should buy this plugin to test it. @c-shultz @pierorocca

@pierorocca
Copy link
Contributor

@alefesouza is the PR for WooPayments repo or for Yith's? If the former you could buy the plugin and get a refund within 30 days. If the latter, I think finish up and hand it over to Yith to confirm and to fix.

@alefesouza alefesouza assigned alefesouza and unassigned c-shultz Dec 23, 2024
@alefesouza alefesouza linked a pull request Dec 23, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: woopay 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

Successfully merging a pull request may close this issue.

8 participants