Closed drsuperior11 closed 2 years ago
Hi @drsuperior11,
Thank you for reporting the issue. PayPal Payments is being developed in another repository: https://github.com/woocommerce/woocommerce-paypal-payments
I am going to move your bug report there so that the right team could take a look further.
Thank you.
This issue has been addressed with the PR #607, which is under review to be included in one of the following updates.
Thank you for your assistance.
Prerequisites
Describe the bug
Hello:
We recently updated to WooCommerce 6.4.1 and now we are getting the following 500 errors:
PHP Fatal error: Uncaught Error: Call to a member function get_cart_contents_total() on null in /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1127\nStack trace:\n#0 /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->is_cart_price_total_zero()\n#1 /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.
php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar()\n#2 /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper()\n#3 /nas/content/live/bankpolicies/wp-includes/class-wp-hook.php(307): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}(Object(WP))\n#4 /nas/content/live/bankpolicies/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)\n#5 /nas/content/live/bankpolicies/wp-includes/plugin.php(522): WP_Hook->do_action(Array)\n#6 /nas/content/live/bankpolicies/wp-includes/class-wp.
php(771): do_action_ref_array(‘wp’, Array)\n#7 /nas/content/live/bankpolicies/wp-includes/functions.php(1310): WP->main(”)\n#8 /nas/content/live/bankpolicies/wp-blog-header.php(16): wp()\n#9 /nas/content/live/bankpolicies/index.php(17): require(‘/nas/content/li…’)\n#10 {main}\n thrown in /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1127`
Thank you for your assistance!
Expected behavior
No 500 errors.
Actual behavior
We are getting the following 500 errors:
PHP Fatal error: Uncaught Error: Call to a member function get_cart_contents_total() on null in /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:1127\nStack trace:\n#0 /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php(378): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->is_cart_price_total_zero()\n#1 /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.
php(195): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_button_wrapper_registrar()\n#2 /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/ButtonModule.php(56): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->render_wrapper()\n#3 /nas/content/live/bankpolicies/wp-includes/class-wp-hook.php(307): WooCommerce\PayPalCommerce\Button\ButtonModule::WooCommerce\PayPalCommerce\Button\{closure}(Object(WP))\n#4 /nas/content/live/bankpolicies/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)\n#5 /nas/content/live/bankpolicies/wp-includes/plugin.php(522): WP_Hook->do_action(Array)\n#6 /nas/content/live/bankpolicies/wp-includes/class-wp.
php(771): do_action_ref_array(‘wp’, Array)\n#7 /nas/content/live/bankpolicies/wp-includes/functions.php(1310): WP->main(”)\n#8 /nas/content/live/bankpolicies/wp-blog-header.php(16): wp()\n#9 /nas/content/live/bankpolicies/index.php(17): require(‘/nas/content/li…’)\n#10 {main}\n thrown in /nas/content/live/bankpolicies/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 1127`
Steps to reproduce
Activate WooCommerce,
WordPress Environment
`
WordPress Environment
WordPress address (URL): https://bankpolicies.com Site address (URL): https://bankpolicies.com WC Version: 6.4.1 REST API Version: ✔ 6.4.1 WC Blocks Version: ✔ 7.2.2 Action Scheduler Version: ✔ 3.4.0 WC Admin Version: ✔ 3.3.2 Log Directory Writable: ✔ WP Version: 5.9.3 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: ✔
Server Environment
Server Info: Apache PHP Version: 8.0.17 PHP Post Max Size: 100 MB PHP Time Limit: 3600 PHP Max Input Vars: 10000 cURL Version: 7.74.0 OpenSSL/1.1.1n
SUHOSIN Installed: – MySQL Version: 5.7.36-39-log Max Upload Size: 50 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔
Database
WC Database Version: 6.4.1 WC Database Prefix: wp_ Total Database Size: 256.67MB Database Data Size: 170.37MB Database Index Size: 86.30MB wp_woocommerce_sessions: Data: 1.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_downloadable_product_permissions: Data: 1.52MB + Index: 2.34MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.38MB + Index: 0.13MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 3.52MB + Index: 4.03MB + Engine InnoDB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_payment_tokenmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 6.02MB + Index: 11.19MB + Engine InnoDB wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_logs: Data: 2.02MB + Index: 2.03MB + Engine InnoDB wp_ac_abandoned_cart_history_lite: Data: 1.52MB + Index: 0.00MB + Engine InnoDB wp_ac_email_templates_lite: Data: 0.03MB + Index: 0.00MB + Engine InnoDB wp_ac_guest_abandoned_cart_history_lite: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ac_sent_history_lite: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_as3cf_items: Data: 0.47MB + Index: 0.39MB + Engine InnoDB wp_aws_cache: Data: 3.52MB + Index: 0.00MB + Engine InnoDB wp_aws_index: Data: 12.22MB + Index: 0.00MB + Engine InnoDB wp_cartflows_ca_cart_abandonment: Data: 0.48MB + Index: 0.02MB + Engine InnoDB wp_cartflows_ca_email_history: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_cartflows_ca_email_templates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_cartflows_ca_email_templates_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 1.52MB + Index: 1.19MB + Engine InnoDB wp_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 3.47MB + Index: 0.09MB + Engine InnoDB wp_postmeta: Data: 48.55MB + Index: 15.06MB + Engine InnoDB wp_posts: Data: 6.52MB + Index: 1.11MB + Engine InnoDB wp_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_redirection_404: Data: 0.17MB + Index: 0.11MB + Engine InnoDB wp_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_redirection_items: Data: 0.23MB + Index: 0.25MB + Engine InnoDB wp_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_termmeta: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_terms: Data: 0.09MB + Index: 0.09MB + Engine InnoDB wp_term_relationships: Data: 0.09MB + Index: 0.06MB + Engine InnoDB wp_term_taxonomy: Data: 0.08MB + Index: 0.06MB + Engine InnoDB wp_usermeta: Data: 2.47MB + Index: 2.84MB + Engine InnoDB wp_users: Data: 0.13MB + Index: 0.14MB + Engine InnoDB wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.17MB + Index: 0.14MB + Engine InnoDB wp_wc_download_log: Data: 0.36MB + Index: 0.34MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.50MB + Index: 0.52MB + Engine InnoDB wp_wc_order_stats: Data: 0.31MB + Index: 0.30MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.06MB + Index: 0.09MB + Engine InnoDB wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wdr_order_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wdr_order_item_discounts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wdr_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpforms_entries: Data: 1.52MB + Index: 0.02MB + Engine InnoDB wp_wpforms_entry_fields: Data: 1.52MB + Index: 0.28MB + Engine InnoDB wp_wpforms_entry_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wpforms_tasks_meta: Data: 0.08MB + Index: 0.00MB + Engine InnoDB wp_wplnst_scans: Data: 0.06MB + Index: 0.08MB + Engine InnoDB wp_wplnst_scans_objects: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wplnst_urls: Data: 1.52MB + Index: 2.28MB + Engine InnoDB wp_wplnst_urls_locations: Data: 13.52MB + Index: 30.28MB + Engine InnoDB wp_wplnst_urls_locations_att: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_wplnst_urls_status: Data: 21.56MB + Index: 6.75MB + Engine InnoDB wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpr_rucss_resources: Data: 14.25MB + Index: 0.11MB + Engine InnoDB wp_wpr_rucss_used_css: Data: 14.38MB + Index: 0.05MB + Engine InnoDB wp_yoast_indexable: Data: 1.52MB + Index: 1.02MB + Engine InnoDB wp_yoast_indexable_hierarchy: Data: 0.11MB + Index: 0.19MB + Engine InnoDB wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_yoast_primary_term: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wp_yoast_seo_links: Data: 1.52MB + Index: 1.80MB + Engine InnoDB wp_yoast_seo_meta: Data: 0.25MB + Index: 0.00MB + Engine InnoDB
Post Type Counts
astra_adv_header: 1 astra-advanced-hook: 1 attachment: 1026 custom_css: 3 fl-builder-template: 36 fl-theme-layout: 1 nav_menu_item: 37 page: 31 post: 38 product: 436 revision: 38 shop_coupon: 9 shop_order: 4010 shop_order_refund: 4 woo_discount: 3 wp_global_styles: 1 wpforms: 2
Security
Secure connection (HTTPS): ✔ Hide errors from visitors: ✔
Active Plugins (25)
Advanced Woo Search: by ILLID – 2.52 WP Offload Media: by Delicious Brains – 2.6.2 Astra Pro: by Brainstorm Force – 3.6.6 Astra Bulk Edit: by Brainstorm Force – 1.2.6 Beaver Builder Plugin (Pro Version): by The Beaver Builder Team – 2.5.3.1 Ultimate Addons for Beaver Builder: by Brainstorm Force – 1.34.5 Better Search Replace: by Delicious Brains – 1.4 Customizer Search: by Brainstorm Force – 1.1.6 Enable Media Replace: by ShortPixel – 3.6.3 Redirection: by John Godley – 5.2.3 Ultimate Addons for Gutenberg: by Brainstorm Force – 1.25.4 WooCommerce Cart Abandonment Recovery: by CartFlows Inc – 1.2.14 Woo Discount Rules: by Flycart – 2.4.0 WooCommerce Extra Product Sorting Options: by SkyVerge – 2.9.0 WooCommerce Stripe Gateway: by WooCommerce – 6.3.0 WooCommerce PayPal Payments: by WooCommerce – 1.7.1 WooCommerce Shipping & Tax: by WooCommerce – 1.25.25 WooCommerce: by Automattic – 6.4.1 WordPress Importer: by wordpressdotorg – 0.7 Yoast SEO: by Team Yoast – 18.5.1 WP Mail SMTP: by WPForms – 3.3.0 WP Rocket: by WP Media – 3.10.9 Smush: by WPMU DEV – 3.9.5 WPForms Custom Captcha: by WPForms – 1.4.0 WPForms: by WPForms – 1.7.3
Inactive Plugins (0)
Dropin Plugins (2)
advanced-cache.php: advanced-cache.php object-cache.php: Memcached Redux
Must Use Plugins (6)
Force Strong Passwords - WPE Edition: by Jason Cosper – 1.8.0 WPE ElasticPress Autosuggest Logger: by WP Engine – 1.0.0 WP Engine Cache Plugin: by WP Engine – 1.0.8 WP Engine Seamless Login Plugin: by WP Engine – 1.5.5 WP Engine Security Auditor: by wpengine – 1.0.10 WP Engine System: by WP Engine – 5.0.1
Settings
API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5)
Connected to WooCommerce.com: ✔
WC Pages
Shop base: woocommerce/woocommerce#1038 - /shop/ Cart: woocommerce/woocommerce#1039 - /cart/ Checkout: woocommerce/woocommerce#1040 - /checkout/ My account: woocommerce/woocommerce#1041 - /my-account/ Terms and conditions: woocommerce/woocommerce#46 - /terms-and-conditions/
Theme
Name: BankPolicies.com Version: 1.0.0 Author URL: http://wpastra.com/about/ Child Theme: ✔ Parent Theme Name: Astra Parent Theme Version: 3.7.9 Parent Theme Author URL: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme WooCommerce Support: ✔
Templates
Overrides: astra-child/woocommerce/emails/customer-completed-order.php astra-child/woocommerce/emails/customer-on-hold-order.php
WooCommerce PayPal Payments
Onboarded: ✔ Shop country code: US WooCommerce currency supported: ✔ PayPal card processing available in country: ✔ Pay Later messaging available in country: ✔ Webhook status: ✔ Vault enabled: ✔ Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: ✔
Action Scheduler
Complete: 5,943 Oldest: 2022-03-17 16:06:20 -0700 Newest: 2022-04-17 10:32:21 -0700
Failed: 5 Oldest: 2020-06-30 02:54:18 -0700 Newest: 2020-07-29 17:33:45 -0700
Pending: 6 Oldest: 2022-04-17 10:47:21 -0700 Newest: 2022-04-20 14:16:13 -0700
Status report information
Generated at: 2022-04-17 10:34:38 -07:00 `
Isolating the problem