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

Unsuccessfully payment with Fastlane, error on console and broken env (3996) #2876

Conversation

Dinamiko
Copy link
Contributor

@Dinamiko Dinamiko commented Dec 5, 2024

Unsuccessfully payment with Fastlane, error on console and broken env.

Steps To Reproduce

  • Navigate to shop as guest
  • Add product to cart
  • Open console
  • Navigate to block checkout page
    • Observe error on console

Screenshot 2024-12-03 at 09 44 51

This PR fixes the error by getting PAYMENT_STORE_KEY from global wc variable instead of importing it.

@Dinamiko Dinamiko added the bug Something isn't working label Dec 5, 2024
Copy link
Collaborator

@stracker-phil stracker-phil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fix the problem ✔︎

Note: To be absolutely sure the wcBlockData object is present, you could add a new dependency to the register_script call:

wp_register_script(
'wc-ppcp-paypal-insights',
untrailingslashit( $module_url ) . '/assets/js/PayPalInsightsLoader.js',
array( 'wp-plugins', 'wp-data', 'wp-element', 'wc-blocks-registry' ),
$asset_version,
true
);

New depedency:

array( 'wp-plugins', 'wp-data', 'wp-element', 'wc-blocks-registry', 
    'wc-blocks-data-store' // ensures the wcBlockData object is present
),

@InpsydeNiklas InpsydeNiklas merged commit 6f85c53 into trunk Dec 6, 2024
9 checks passed
@InpsydeNiklas InpsydeNiklas deleted the PCP-3996-unsuccessfully-payment-with-fastlane-error-on-console-and-broken-env branch December 6, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants