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

BP-3894 Apple Pay button issue on product page #1102

Closed
jansentjeu opened this issue Nov 18, 2024 · 3 comments
Closed

BP-3894 Apple Pay button issue on product page #1102

jansentjeu opened this issue Nov 18, 2024 · 3 comments
Assignees
Labels
Bug Bugs, functions that are not working like they should. Priority: Normal This issue has a normal/medium priority. Status: Released A fix is included in a release already.

Comments

@jansentjeu
Copy link

jansentjeu commented Nov 18, 2024

If there is no configuration value in the database for payment/buckaroo_magento2_applepay/available_buttons an error will appear on the product page. TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in Block/Catalog/Product/View/Applepay.php:66

Steps to reproduce:

  1. Make sure there is no value for the configuration payment/buckaroo_magento2_applepay/available_buttons in the database
  2. Go to a product page
  3. An error is displayed

Cause of the issue:
It's because of the changes in commit 385f7d16924d37baec581e63934207cf2cf59844, file Block/Catalog/Product/View/Applepay.php, function canShowButton($page). Here the check $this->applepayConfigProvider->getAvailableButtons() has been removed. If there is no configuration value in the database, false is returned. However, an in_array() call is executed on this.

Solution:
Add the check again. See screenshot below.
Scherm­afbeelding 2024-11-18 om 21 20 18

Version:

  • Magento version 2.4.7-p3
  • Buckaroo version 1.50.2.
@mgroensmit
Copy link
Contributor

I'm running into the same problem. I created a Pull Request for this: #1111

@Buckaroo-Rene
Copy link
Contributor

Buckaroo-Rene commented Dec 2, 2024

Hi @jansentjeu ,

Thank you for your message! Our team has addressed this issue in the following PR:
BP-3894

The fix will be included in our upcoming release.

@Buckaroo-Rene Buckaroo-Rene changed the title Apple Pay button issue on product page BP-3894 Apple Pay button issue on product page Dec 2, 2024
@Buckaroo-Rene Buckaroo-Rene self-assigned this Dec 2, 2024
@Buckaroo-Rene Buckaroo-Rene added Bug Bugs, functions that are not working like they should. Status: Waiting for release This issue has been solved, but is not released yet. Priority: Normal This issue has a normal/medium priority. labels Jan 22, 2025
@Buckaroo-Rene
Copy link
Contributor

Hi @jansentjeu ,

A fix has been implemented in v1.51.0.

@Buckaroo-Rene Buckaroo-Rene added Status: Released A fix is included in a release already. and removed Status: Waiting for release This issue has been solved, but is not released yet. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bugs, functions that are not working like they should. Priority: Normal This issue has a normal/medium priority. Status: Released A fix is included in a release already.
Projects
None yet
Development

No branches or pull requests

3 participants