Closed danielpaukowitsch closed 1 year ago
Hi @danielpaukowitsch Can you please give it a try with the new pre-release version from here and let us know if this resolves the issue for you?: https://github.com/woocommerce/woocommerce-paypal-payments/releases/tag/2.4.0-rc1 If you need additional guidance, we kindly ask that you reach out directly to our support team. Thank you!
Cart Resets When Adding another Product
After configuring the woocommerce-paypal-payments plugin and deactivating the old PayPal payments, it is not possible to add a variable product to the cart if there is already another variable product in the cart.
Clicking the "add to cart" button multiple times on the same product as well as adding a simple product to the cart does work as intended.
But if I want to add another different variable product to the cart, it fails and resets the whole cart, and only adds the latest product.
To Reproduce
Expected Behavior
Expected that at least both products are in the cart
Actual Behavior
Only the last product is in the cart and all previously added products are removed.
No console errors are observed. You can find the woocommerce logs at the end of this issue.
Environment
Additional Details
System status
``` ` ### wp-core ### version: 6.3.2 site_language: de_DE user_language: de_DE timezone: Europe/Vienna permalink: /%year%/%monthnum%/%day%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: production user_count: 3 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /html/wordpress wordpress_size: 46,80 MB (49073324 bytes) uploads_path: /html/wordpress/wp-content/uploads uploads_size: 123,49 MB (129493004 bytes) themes_path: /html/wordpress/wp-content/themes themes_size: 12,15 MB (12742882 bytes) plugins_path: /html/wordpress/wp-content/plugins plugins_size: 49,06 MB (51442042 bytes) database_size: 78,75 MB (82575360 bytes) total_size: 310,26 MB (325326612 bytes) ### wp-active-theme ### name: --- version: --- author: --- author_website: --- parent_theme: Neve (neve) theme_features: core-block-patterns, hfg_support, widgets-block-editor, post-thumbnails, title-tag, automatic-feed-links, custom-logo, html5, customize-selective-refresh-widgets, custom-background, align-wide, editor-color-palette, fl-theme-builder-headers, fl-theme-builder-footers, fl-theme-builder-parts, header-footer-elementor, lifterlms-sidebars, lifterlms, service_worker, starter-content, menus, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, widgets theme_path: /html/wordpress/wp-content/themes/--- auto_update: Deaktiviert ### wp-parent-theme ### name: Neve (neve) version: 3.7.2 author: ThemeIsle author_website: https://themeisle.com theme_path: /html/wordpress/wp-content/themes/neve auto_update: Deaktiviert ### wp-themes-inactive (1) ### Twenty Twenty-Three: version: 1.2, author: Das WordPress-Team, Automatische Aktualisierungen deaktiviert ### wp-plugins-active (16) ### Advanced WordPress Backgrounds: version: 1.11.4, author: Advanced WordPress Backgrounds Team, Automatische Aktualisierungen deaktiviert Better Search Replace: version: 1.4.3, author: WP Engine, Automatische Aktualisierungen aktiviert Child Theme Configurator: version: 2.6.3, author: Lilaea Media, Automatische Aktualisierungen deaktiviert Code Snippets: version: 3.5.0, author: Code Snippets Pro, Automatische Aktualisierungen deaktiviert German Market: version: 3.29, author: MarketPress (latest version: 3.30), Automatische Aktualisierungen deaktiviert Loco Translate: version: 2.6.6, author: Tim Whitlock, Automatische Aktualisierungen deaktiviert OMGF: version: 5.7.4, author: Daan from Daan.dev, Automatische Aktualisierungen aktiviert Otter – Page Builder Blocks & Extensions for Gutenberg: version: 2.4.0, author: ThemeIsle, Automatische Aktualisierungen deaktiviert Post SMTP: version: 2.6.1, author: Post SMTP, Automatische Aktualisierungen deaktiviert Smart Slider 3: version: 3.5.1.19, author: Nextend, Automatische Aktualisierungen deaktiviert WooCommerce: version: 8.2.1, author: Automattic, Automatische Aktualisierungen deaktiviert WooCommerce PayPal Payments: version: 2.3.1, author: WooCommerce, Automatische Aktualisierungen deaktiviert Wordfence Security: version: 7.10.4, author: Wordfence, Automatische Aktualisierungen aktiviert WP Menu Cart: version: 2.14.1, author: WP Overnight, Automatische Aktualisierungen deaktiviert WP Statistics: version: 14.2, author: VeronaLabs, Automatische Aktualisierungen aktiviert Yoast SEO: version: 21.4, author: Team Yoast, Automatische Aktualisierungen aktiviert ### wp-plugins-inactive (2) ### Cookie Notice & Compliance for GDPR / CCPA: version: 2.4.11.1, author: Hu-manity.co, Automatische Aktualisierungen deaktiviert Query Monitor: version: 3.13.1, author: John Blackbourn, Automatische Aktualisierungen deaktiviert ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1690 imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org imagick_version: 3.6.0 file_uploads: File uploads is turned off post_max_size: 32M upload_max_filesize: 32M max_effective_size: 32 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 1.008 GB imagick::RESOURCETYPE_DISK: 1.844674407371E+19 imagick::RESOURCETYPE_FILE: 768 imagick::RESOURCETYPE_MAP: 1.008 GB imagick::RESOURCETYPE_MEMORY: 504 GB imagick::RESOURCETYPE_THREAD: 1 imagick::RESOURCETYPE_TIME: 1.844674407371E+19 imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: bundled (2.1.0 compatible) gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: not available ### wp-server ### server_architecture: Linux 5.4.0-156-generic x86_64 httpd_software: Apache php_version: 7.4.33 64bit php_sapi: fpm-fcgi max_input_variables: 1500 time_limit: 240 memory_limit: 256M max_input_time: 240 upload_max_filesize: 32M php_post_max_size: 32M curl_version: 7.68.0 OpenSSL/1.1.1f suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: false current: 2023-10-17T16:31:40+00:00 utc-time: Tuesday, 17-Oct-23 16:31:40 UTC server-time: 2023-10-17T18:31:39+02:00 ### wp-database ### extension: mysqli server_version: 5.7.35-38 client_version: mysqlnd 7.4.33 max_allowed_packet: 67108864 max_connections: 200 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /html/wordpress/wp-content WP_PLUGIN_DIR: /html/wordpress/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Nicht definiert WP_DEVELOPMENT_MODE: undefined DB_CHARSET: utf8 DB_COLLATE: utf8_general_ci ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable ### neve ### api: Ja child: /html/wordpress/wp-content/themes/---/functions.php, /html/wordpress/wp-content/themes/---/screenshot.png, /html/wordpress/wp-content/themes/---/style.css, /html/wordpress/wp-content/themes/---/header.php customizer_css: Nein ` ```Error log
woocommerce error log
``` 2023-10-17T15:51:19+00:00 CRITICAL Uncaught TypeError: Argument 1 passed to WooCommerce\PayPalCommerce\Button\Endpoint\SimulateCartEndpoint::__construct() must be an instance of WooCommerce\PayPalCommerce\Button\Assets\SmartButton, instance of WooCommerce\PayPalCommerce\Button\Assets\DisabledSmartButton given, called in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php on line 136 and defined in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php:47 Stack trace: #0 /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(136): WooCommerce\PayPalCommerce\Button\Endpoint\SimulateCartEndpoint->__construct(Object(WooCommerce\PayPalCommerce\Button\Assets\DisabledSmartButton), Object(WC_Cart), Object(WooCommerce\PayPalCommerce\Button\Endpoint\RequestData), Object(WC_Data_Store), Object(WooCommerce\WooCommerce\Logging\Logger\NullLogger)) #1 /html/wordpress/wp-content/plugins/woocommerce-paypal-payme in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php in Zeile 47 2023-10-17T15:52:45+00:00 CRITICAL Uncaught TypeError: Argument 1 passed to WooCommerce\PayPalCommerce\Button\Endpoint\SimulateCartEndpoint::__construct() must be an instance of WooCommerce\PayPalCommerce\Button\Assets\SmartButton, instance of WooCommerce\PayPalCommerce\Button\Assets\DisabledSmartButton given, called in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php on line 136 and defined in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php:47 Stack trace: #0 /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(136): WooCommerce\PayPalCommerce\Button\Endpoint\SimulateCartEndpoint->__construct(Object(WooCommerce\PayPalCommerce\Button\Assets\DisabledSmartButton), Object(WC_Cart), Object(WooCommerce\PayPalCommerce\Button\Endpoint\RequestData), Object(WC_Data_Store), Object(WooCommerce\WooCommerce\Logging\Logger\NullLogger)) #1 /html/wordpress/wp-content/plugins/woocommerce-paypal-payme in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php in Zeile 47 2023-10-17T15:52:55+00:00 CRITICAL Uncaught TypeError: Argument 1 passed to WooCommerce\PayPalCommerce\Button\Endpoint\SimulateCartEndpoint::__construct() must be an instance of WooCommerce\PayPalCommerce\Button\Assets\SmartButton, instance of WooCommerce\PayPalCommerce\Button\Assets\DisabledSmartButton given, called in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php on line 136 and defined in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php:47 Stack trace: #0 /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(136): WooCommerce\PayPalCommerce\Button\Endpoint\SimulateCartEndpoint->__construct(Object(WooCommerce\PayPalCommerce\Button\Assets\DisabledSmartButton), Object(WC_Cart), Object(WooCommerce\PayPalCommerce\Button\Endpoint\RequestData), Object(WC_Data_Store), Object(WooCommerce\WooCommerce\Logging\Logger\NullLogger)) #1 /html/wordpress/wp-content/plugins/woocommerce-paypal-payme in /html/wordpress/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Endpoint/SimulateCartEndpoint.php in Zeile 47 ```Is anyone else experiencing this issue or has a workaround? Any insights or fixes would be greatly appreciated.
Kind regards, Daniel