woocommerce / woocommerce-paypal-payments

https://wordpress.org/plugins/woocommerce-paypal-payments/
GNU General Public License v2.0
61 stars 47 forks source link

Error when used alongside Shipment Tracking plugin #2305

Closed S17Hughie closed 1 month ago

S17Hughie commented 1 month ago

Describe the Bug

When this plugin is used alongside the Shipment Tracking plugin, and an administrative user tries to add a shipment tracking code to an order that was paid with some other payment method, a 500 error is throw in the XHR as this plugin tries to retrieve a Paypal ID on an order that wasn't paid via Paypal.

To Reproduce

  1. Purchase a product and pay using any other payment gateway
  2. Try adding a shipment tracking code
  3. You'll see it appears to just hang, with a loading spinner sat there indefinitely.
  4. Looking in the Network tab of dev tools, you'll see the 500 error.

Screenshots

Expected Behavior

The shipment tracking number to save as expected.

Actual Behavior

An infinitely spinning loading animation

Environment

Additional Details

Here is a copy and paste from the error message:

Fatal error: Uncaught Exception: PayPal order ID not found in meta. in /public_html/wp-content/plugins/woocommerce-paypal-payments/api/order-functions.php on line 38

Call stack:

WooCommerce\P\A\ppcp_get_paypal_order()
wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-order-tracking/src/Integration/ShipmentTrackingIntegration.php:88
WooCommerce\P\O\I\ShipmentTrackingIntegration::WooCommerce\P\O\I\{closure}()
wp-includes/class-wp-hook.php:324
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:348
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-admin/admin-ajax.php:192
System status ``` ` ### WordPress Environment ### WordPress address (URL): https://simplybathrooms.co.uk Site address (URL): https://simplybathrooms.co.uk WC Version: 8.9.1 REST API Version: ✔ 8.9.1 Action Scheduler Version: ✔ 3.7.4 Log Directory Writable: ✔ WP Version: 6.5.3 WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: – WP Cron: ✔ Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 8.2.17 PHP Post Max Size: 256 MB PHP Time Limit: 300 PHP Max Input Vars: 3200 cURL Version: 8.1.2 OpenSSL/3.0.8 SUHOSIN Installed: – MySQL Version: 10.4.31-MariaDB-log Max Upload Size: 256 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 8.9.1 WC Database Prefix: 9c_ Total Database Size: 843.57MB Database Data Size: 629.97MB Database Index Size: 213.60MB 9c_woocommerce_sessions: Data: 2.02MB + Index: 0.02MB + Engine InnoDB 9c_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_woocommerce_order_items: Data: 3.52MB + Index: 1.52MB + Engine InnoDB 9c_woocommerce_order_itemmeta: Data: 19.55MB + Index: 16.03MB + Engine InnoDB 9c_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_woocommerce_shipping_zone_locations: Data: 0.05MB + Index: 0.05MB + Engine InnoDB 9c_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_actionscheduler_actions: Data: 42.56MB + Index: 34.17MB + Engine InnoDB 9c_actionscheduler_claims: Data: 0.19MB + Index: 0.11MB + Engine InnoDB 9c_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_actionscheduler_logs: Data: 28.55MB + Index: 16.03MB + Engine InnoDB 9c_aioseo_cache: Data: 0.31MB + Index: 0.03MB + Engine InnoDB 9c_aioseo_notifications: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_aioseo_posts: Data: 2.52MB + Index: 0.05MB + Engine InnoDB 9c_categorymeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_comments: Data: 14.52MB + Index: 11.09MB + Engine InnoDB 9c_cp_calculated_fields_form_discount_codes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_cp_calculated_fields_form_posts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_cp_calculated_fields_form_revision: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_cp_calculated_fields_form_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_expm_hiiden_content: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_expm_maker: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_expm_maker_pages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_failed_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_find_and_replace: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_followup_coupons: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_followup_customers: Data: 0.05MB + Index: 0.06MB + Engine InnoDB 9c_followup_customer_carts: Data: 0.09MB + Index: 0.03MB + Engine InnoDB 9c_followup_customer_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_followup_customer_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_followup_email_excludes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_followup_email_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_followup_email_orders: Data: 0.27MB + Index: 0.13MB + Engine InnoDB 9c_followup_email_tracking: Data: 0.02MB + Index: 0.08MB + Engine InnoDB 9c_followup_followup_history: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_followup_order_categories: Data: 0.05MB + Index: 0.03MB + Engine InnoDB 9c_followup_order_items: Data: 0.05MB + Index: 0.05MB + Engine InnoDB 9c_followup_subscribers: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_gla_budget_recommendations: Data: 0.20MB + Index: 0.11MB + Engine InnoDB 9c_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_guardgiant_ip_failed_logins: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_guardgiant_login_activity_log: Data: 0.05MB + Index: 0.00MB + Engine InnoDB 9c_guardgiant_user_failed_logins: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_mailpoet_mapping_to_external_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_newsletter_templates: Data: 2.52MB + Index: 0.00MB + Engine InnoDB 9c_mailpoet_scheduled_tasks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_scheduled_task_subscribers: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_sending_queues: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB 9c_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_subscribers: Data: 0.02MB + Index: 0.13MB + Engine InnoDB 9c_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_subscriber_segment: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_masterslider_options: Data: 0.11MB + Index: 0.02MB + Engine InnoDB 9c_masterslider_sliders: Data: 0.06MB + Index: 0.03MB + Engine InnoDB 9c_member_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_options: Data: 6.31MB + Index: 1.28MB + Engine InnoDB 9c_portfolio_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_postmeta: Data: 217.75MB + Index: 100.23MB + Engine InnoDB 9c_posts: Data: 37.55MB + Index: 8.05MB + Engine InnoDB 9c_product_catmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_queue: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB 9c_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_revslider_sliders: Data: 0.08MB + Index: 0.00MB + Engine InnoDB 9c_revslider_slides: Data: 0.33MB + Index: 0.00MB + Engine InnoDB 9c_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_sgs_log_events: Data: 2.52MB + Index: 0.00MB + Engine InnoDB 9c_sgs_log_visitors: Data: 1.52MB + Index: 0.00MB + Engine InnoDB 9c_shortpixel_queue: Data: 1.52MB + Index: 1.25MB + Engine InnoDB 9c_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_termmeta: Data: 0.33MB + Index: 0.31MB + Engine InnoDB 9c_terms: Data: 0.19MB + Index: 0.19MB + Engine InnoDB 9c_term_relationships: Data: 3.52MB + Index: 2.52MB + Engine InnoDB 9c_term_taxonomy: Data: 0.34MB + Index: 0.20MB + Engine InnoDB 9c_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_usermeta: Data: 8.52MB + Index: 6.03MB + Engine InnoDB 9c_users: Data: 1.52MB + Index: 0.55MB + Engine InnoDB 9c_wcpdf_invoice_number: Data: 0.28MB + Index: 0.00MB + Engine InnoDB 9c_wcpdf_packing_slip_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wc_admin_notes: Data: 0.11MB + Index: 0.00MB + Engine InnoDB 9c_wc_admin_note_actions: Data: 0.09MB + Index: 0.02MB + Engine InnoDB 9c_wc_appointments_availability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wc_appointment_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_wc_category_lookup: Data: 0.05MB + Index: 0.00MB + Engine InnoDB 9c_wc_customer_lookup: Data: 1.52MB + Index: 0.39MB + Engine InnoDB 9c_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_wc_gpf_render_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wc_orders: Data: 0.02MB + Index: 0.11MB + Engine InnoDB 9c_wc_orders_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_wc_order_addresses: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_wc_order_operational_data: Data: 0.02MB + Index: 0.03MB + Engine InnoDB 9c_wc_order_product_lookup: Data: 2.52MB + Index: 1.22MB + Engine InnoDB 9c_wc_order_stats: Data: 2.52MB + Index: 0.81MB + Engine InnoDB 9c_wc_order_tax_lookup: Data: 1.52MB + Index: 0.58MB + Engine InnoDB 9c_wc_product_attributes_lookup: Data: 4.52MB + Index: 3.52MB + Engine InnoDB 9c_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wc_product_meta_lookup: Data: 1.52MB + Index: 1.30MB + Engine InnoDB 9c_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wfBlockedIPLog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfBlocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_wfConfig: Data: 1.52MB + Index: 0.00MB + Engine InnoDB 9c_wfCrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfFileChanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfFileMods: Data: 129.77MB + Index: 0.00MB + Engine InnoDB 9c_wfHits: Data: 1.52MB + Index: 0.08MB + Engine InnoDB 9c_wfHoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wfIssues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_wfKnownFileList: Data: 65.58MB + Index: 0.00MB + Engine InnoDB 9c_wfLiveTrafficHuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wfLocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfLogins: Data: 0.45MB + Index: 0.13MB + Engine InnoDB 9c_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY 9c_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfNotifications: Data: 0.06MB + Index: 0.00MB + Engine InnoDB 9c_wfPendingIssues: Data: 0.02MB + Index: 0.06MB + Engine InnoDB 9c_wfReverseCache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfSecurityEvents: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfSNIPCache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB 9c_wfStatus: Data: 1.02MB + Index: 0.09MB + Engine InnoDB 9c_wfTrafficRates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wfWafFailures: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_woocommerce_gpf_google_taxonomy: Data: 1.52MB + Index: 0.00MB + Engine InnoDB 9c_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wt_iew_action_history: Data: 0.11MB + Index: 0.00MB + Engine InnoDB 9c_wt_iew_cron: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wt_iew_ftp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_wt_iew_mapping_template: Data: 0.02MB + Index: 0.00MB + Engine InnoDB 9c_yith_wcwl: Data: 1.52MB + Index: 0.16MB + Engine InnoDB 9c_yith_wcwl_lists: Data: 1.52MB + Index: 0.88MB + Engine InnoDB 9c_yoast_indexable: Data: 5.52MB + Index: 0.83MB + Engine InnoDB 9c_yoast_indexable_hierarchy: Data: 0.19MB + Index: 0.25MB + Engine InnoDB 9c_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB 9c_yoast_primary_term: Data: 0.23MB + Index: 0.20MB + Engine InnoDB 9c_yoast_seo_links: Data: 1.52MB + Index: 0.30MB + Engine InnoDB 9c_yoast_seo_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### acf-field: 18 acf-field-group: 7 attachment: 14013 block: 3 custom_css: 3 elementor_library: 1 follow_up_email: 1 jetpack_migration: 2 mc4wp-form: 1 nav_menu_item: 279 oembed_cache: 12 page: 52 porto_builder: 4 post: 10 product: 3243 product_variation: 1270 revision: 1500 shop_coupon: 9 shop_order: 11508 shop_order_refund: 789 sidebar: 2 wc_appointment: 961 wp_block: 13 wp_global_styles: 1 wp_navigation: 1 wpcf7_contact_form: 9 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (34) ### Query Monitor: by John Blackbourn – 3.16.3 AG WooCommerce Barclay ePDQ Payment Gateway: by We are AG – 4.7.1 Advanced Custom Fields PRO: by WP Engine – 6.3.0.1 Button Block: by bPlugins LLC – 1.1.3 Carousel Slider Block: by – 1.0.14 Categories Images: by Muhammad El Zahlan – 3.1.0 Honeypot for Contact Form 7: by Nocean – 2.1.1 Contact Form 7: by Takayuki Miyoshi – 5.9.5 Disable User Login: by Saint Systems – 1.3.9 Read More: by Edmon – 3.3.8.4 GuardGiant Brute Force Protection: by GuardGiant Brute Force Protection – 2.2.6 WooCommerce List Pricing: by Source 17 Ltd – 1.0 Yell4Postcode WC integration: by Hughie Wilmshurst – 1.0 Merlin Integration: by Hughie Wilmshurst – 1.2.6 Regenerate Thumbnails Advanced: by ShortPixel – 2.5.0 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.6 REVIEWS.io for WooCommerce: by Reviews.co.uk – 1.2.7 Simple 301 Redirects: by WPDeveloper – 2.0.9 TinyPNG - JPEG, PNG & WebP image compression: by TinyPNG – 3.4.3 WooCommerce No Shipping Message: by dangoodman – 2.1.9 WooCommerce Weight Based Shipping +: by weightbasedshipping.com – 5.9.1 Preview E-mails for WooCommerce: by Digamber Pradhan – 2.2.10 Woo Product Category Sort: by Hughie Wilmshurst – 1.0.1 WooCommerce Conversion Tracking: by weDevs – 2.0.12 Google Analytics for WooCommerce: by WooCommerce – 2.0.7 WooCommerce PayPal Payments: by WooCommerce – 2.7.1 PDF Invoices & Packing Slips for WooCommerce: by WP Overnight – 3.8.2 WooCommerce Shipment Tracking: by WooCommerce – 2.4.8 WooCommerce: by Automattic – 8.9.1 Wordfence Security: by Wordfence – 7.11.5 Yoast SEO: by Team Yoast – 22.8 WP 2FA - Two-factor authentication for WordPress: by Melapress – 2.6.4 WP Migrate: by WP Engine – 2.6.12 WP-Optimize - Clean, Compress, Cache: by David Anderson Ruhani Rabin Team Updraft – 3.3.2 ### Inactive Plugins (2) ### GTM4WP - A Google Tag Manager (GTM) plugin for WordPress: by Thomas Geiger – 1.20.2 WooCommerce Google Product Feed: by Ademti Software Ltd. – 11.0.8 ### Dropin Plugins () ### db.php: Query Monitor Database Class (Drop-in) ### Must Use Plugins (1) ### WP Migrate Compatibility: by Delicious Brains – 1.3 ### Settings ### API Enabled: – Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: appointment (appointment) 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: – Enforce Approved Product Download Directories: – HPOS feature enabled: – Order datastore: WC_Order_Data_Store_CPT HPOS data sync enabled: – ### Logging ### Enabled: ✔ Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2 Retention period: 30 days Level threshold: – Log directory size: 109 MB ### WC Pages ### Shop base: #207 - /shop/ Basket: #34 - /basket/ Checkout: #35 - /checkout/ My account: #36 - /my-account/ Terms and conditions: #4935 - /terms-conditions/ ### Theme ### Name: Simply Bathrooms Version: 1 Author URL: https://hughiew.co.uk Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: simplybathrooms/woocommerce/cart/cart.php version - is out of date. The core version is 7.9.0 simplybathrooms/woocommerce/content-widget-price-filter.php version - is out of date. The core version is 7.0.1 Outdated Templates: ❌ Learn how to update ### WooCommerce PayPal Payments ### Onboarded: ✔ Shop country code: GB WooCommerce currency supported: ✔ Advanced Card Processing available in country: ✔ Pay Later messaging available in country: ✔ Webhook status: ✔ PayPal Vault enabled: – ACDC Vault enabled: – Logging enabled: – Reference Transactions: – Used PayPal Checkout plugin: ✔ Subscriptions Mode: Disabled ### Admin ### Enabled Features: activity-panels analytics product-block-editor coupons core-profiler customize-store customer-effort-score-tracks import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks product-variation-management product-virtual-downloadable product-external-affiliate product-grouped product-linked product-pre-publish-modal product-custom-fields remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page Disabled Features: minified-js new-product-management-experience settings async-product-editor-category-field launch-your-store Daily Cron: ✔ Next scheduled: 2024-06-03 17:54:16 +01:00 Options: ✔ Notes: 208 Onboarding: completed ### Action Scheduler ### Complete: 106,446 Oldest: 2024-05-03 10:12:42 +0100 Newest: 2024-06-03 10:08:20 +0100 Failed: 5,085 Oldest: 2019-06-19 08:59:14 +0100 Newest: 2024-02-10 01:15:08 +0000 Pending: 9 Oldest: 2024-06-03 10:59:07 +0100 Newest: 2024-06-06 16:50:58 +0100 ### Status report information ### Generated at: 2024-06-03 10:11:41 +01:00 ` ```
S17Hughie commented 1 month ago

In doing some digging, specifically in woocommerce-paypal-payments/modules/ppcp-order-tracking/src/Integration/ShipmentTrackingIntegration.php on line 88, there is no check in place to see if the order in question was paid for via PayPal. In fact, the same is true for all integration modules.

I can't be bothered to go through the pull request process, but it's an easy fix... make the return type of ppcp_get_paypal_order nullable, return null instead of an exception when there is no paypal order returned, and then simply check if $paypal_order comes back empty in the wp_ajax_wc_shipment_tracking_save_form actions.

InpsydeNiklas commented 1 month ago

Hi @S17Hughie Thanks for the issue report, and I apologize for the trouble. This error was resolved in #2289. It can be worked around either with a temporary downgrade to version 2.7.0 or by installing the latest pre-release version 2.8.0-rc1 which is expected to be released officially next week.

If you need additional guidance on how to resolve the error, I recommend contacting our support team directly from here: https://woocommerce.com/document/woocommerce-paypal-payments/#get-help Thank you!