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

Fatal error on home page after installing the plugin #883

Open
ilearnio opened this issue Sep 1, 2021 · 0 comments · May be fixed by #884
Open

Fatal error on home page after installing the plugin #883

ilearnio opened this issue Sep 1, 2021 · 0 comments · May be fixed by #884

Comments

@ilearnio
Copy link

ilearnio commented Sep 1, 2021

Describe the bug

I'm getting a fatal error on home page after installing this plugin. This is because I'm displaying product via shortcode on home page.

I am going to prepare a PR regarding this issue.

Copy of this issue on WP https://wordpress.org/support/topic/fatal-error-on-home-page-after-successfull-payment/

2021/08/30 20:36:09 [error] 2677#0: *22739 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get_price() on bool in /var/www/site.com/public/wp-content/plugins/woocommerce/includes/wc-product-functions.php:963
Stack trace:
#0 /var/www/site.com/public/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-cart-handler.php(533): wc_get_price_including_tax()
#1 /var/www/site.com/public/wp-includes/class-wp-hook.php(303): WC_Gateway_PPEC_Cart_Handler->inject_credit_messaging_configuration()
#2 /var/www/site.com/public/wp-includes/plugin.php(189): WP_Hook->apply_filters()
#3 /var/www/site.com/public/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-cart-handler.php(610): apply_filters()
#4 /var/www/site.com/public/wp-includes/class-wp-hook.php(303): WC_Gateway_PPEC_Cart_Handler->enqueue_scripts()
#5 /var/www/site.com/public/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
#6 /var/www/site.com/publ" while reading response header from upstream, client: 176.120.105.249, server: site.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9050", host: "site.com"
2021/08/30 21:15:16 [error] 2674#0: *23148 FastCGI sent in stderr: "Unable to open primary script: /var/www/site.com/public/cli/garbagecron.php (No such file or directory)" while reading response header from upstream, client: 185.191.34.215, server: site.com, request: "POST /cli/garbagecron.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9050", host: "site.com"

To reproduce

  1. Add a product to home page with a shortcode [product_page id="ID"]
  2. Navigate to home page

Expected behavior

Environment (please complete the following information):

  • WordPress Version: 5.8
  • WooCommerce Version: 5.3.0
  • PayPal (Express) Checkout Plugin Version: 2.1.2
  • Browser [e.g. chrome, safari] and Version: Chrome
  • Any other plugins installed

Additional details

System status
<!--If applicable, paste the system status here. Please ensure you redact or remove any identifying information. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant