woocommerce / woocommerce-gateway-paypal-express-checkout

59 stars 64 forks source link

PayPal Checkout and Pre-order "Upon release" compatibility #854

Open dphyled opened 3 years ago

dphyled commented 3 years ago

(Initially opened in Pre-order repo, but advised to move here -- looks like compat for Stripe payment request buttons are handled in Stripe plugin)

Describe the bug

When a pre-order product is set to charge "Upon release", and PayPal Checkout buttons are set to display on the single product page and Cart page, the customer can click them and go through payment flow with PayPal. But after returning to site, on the "Confirm your PayPal order" page they get an error message that there are no payment methods allowed.

To reproduce

  1. Create product with Pre-order set to charge "Upon release"
  2. Enable a PayPal Checkout buttons to show on single Product page
  3. Visit single product page and click on PayPal button, then go through payment steps in PP modal
  4. Return to site, and see error that no payment methods are available

Screenshot Screenshot direct link: https://d.pr/i/bqWNP7

Expected behavior

I guess, don't display PayPal buttons for Pre-order products where payment is not being taken up front.

Environment (please complete the following information):

Additional details

System status ``` ``` ### WordPress Environment ### WordPress address (URL): https://kelwoo.test Site address (URL): https://kelwoo.test WC Version: 5.0.0 REST API Version: ✔ 5.0.0 WC Blocks Version: ✔ 4.0.0 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 1.9.0 Log Directory Writable: ✔ WP Version: 5.6.1 WP Multisite: – WP Memory Limit: 2 GB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US External object cache: – Server Environment Server Info: nginx/1.19.4 PHP Version: 7.4.13 PHP Post Max Size: 128 MB PHP Time Limit: 300 PHP Max Input Vars: 1000 cURL Version: 7.74.0 (SecureTransport) OpenSSL/1.1.1i SUHOSIN Installed: – MySQL Version: 5.7.32 Max Upload Size: 128 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ Database WC Database Version: 5.0.0 WC Database Prefix: wp_ Total Database Size: 37.51MB Database Data Size: 24.51MB Database Index Size: 13.00MB wp_woocommerce_sessions: Data: 0.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: 0.02MB + Index: 0.06MB + Engine InnoDB wp_woocommerce_order_items: Data: 0.13MB + Index: 0.08MB + Engine InnoDB wp_woocommerce_order_itemmeta: Data: 1.23MB + Index: 1.80MB + 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.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_actionscheduler_actions: Data: 1.16MB + Index: 0.70MB + 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: 1.38MB + Index: 0.45MB + Engine InnoDB wp_advanced_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_advanced_notification_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_ariadminer_connections: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_auctions_for_woocommerce_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_automatewoo_abandoned_carts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_automatewoo_customers: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_automatewoo_customer_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_events: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_automatewoo_guests: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_automatewoo_guest_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_logs: Data: 1.52MB + Index: 0.72MB + Engine InnoDB wp_automatewoo_log_meta: Data: 2.52MB + Index: 3.03MB + Engine InnoDB wp_automatewoo_queue: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_automatewoo_queue_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_automatewoo_referrals: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_automatewoo_referral_advocate_keys: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_automatewoo_referral_invites: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.25MB + Index: 0.33MB + Engine InnoDB wp_followup_coupons: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_customers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_followup_customer_carts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_customer_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_customer_orders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_followup_email_excludes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_email_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_email_orders: Data: 0.02MB + Index: 0.09MB + Engine InnoDB wp_followup_email_tracking: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_followup_followup_history: Data: 0.05MB + Index: 0.05MB + Engine InnoDB wp_followup_order_categories: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_order_items: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_followup_subscribers: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_subscribers_to_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_i13_woo_slider: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_options: Data: 3.03MB + Index: 0.16MB + Engine InnoDB wp_postmeta: Data: 1.52MB + Index: 2.95MB + Engine InnoDB wp_posts: Data: 0.28MB + Index: 0.16MB + Engine InnoDB wp_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_usermeta: Data: 0.08MB + Index: 0.06MB + Engine InnoDB wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wcpv_commissions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcpv_per_product_shipping_rules: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcrp_rental_products_rentals: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wcs_payment_retries: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_bookings_availability: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_bookings_availabilitymeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_booking_relationships: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_deposits_payment_plans: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wc_deposits_payment_plans_schedule: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_order_product_lookup: Data: 0.06MB + Index: 0.06MB + Engine InnoDB wp_wc_order_stats: Data: 0.05MB + Index: 0.05MB + Engine InnoDB wp_wc_order_tax_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_wc_points_rewards_user_points_log: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_product_meta_lookup: Data: 0.05MB + Index: 0.09MB + 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_warranty_products: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_bundled_itemmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_exported_csv_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_wpml_mails: Data: 9.52MB + Index: 0.00MB + Engine InnoDB Post Type Counts afadv_qty: 2 attachment: 32 aw_workflow: 9 bookable_person: 4 bookable_resource: 2 custom_css: 1 customize_changeset: 9 event_ticket: 4 follow_up_email: 2 lty_lottery_ticket: 2 nav_menu_item: 10 order_shipment: 4 page: 27 post: 2 product: 87 product_variation: 107 revision: 72 shipping_package: 1 shop_coupon: 13 shop_order: 255 shop_order_refund: 7 shop_subscription: 27 tribe_events: 1 tribe_rsvp_tickets: 1 warranty_request: 2 wc_booking: 29 wc_membership_plan: 2 wc_memberships_team: 1 wc_team_invitation: 1 wc_user_membership: 2 wcpf_item: 7 wcpf_project: 2 Security Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ Active Plugins (16) ARI Adminer: by ARI Soft – 1.2.3 WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.1 WooCommerce Stripe Gateway: by WooCommerce – 4.8.0 WooCommerce Pre-Orders: by WooCommerce – 1.5.29 WooCommerce: by Automattic – 5.0.0 Inactive Plugins (718) [redacted since I use the all-plugins repo] Settings API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: accommodation-booking (accommodation-booking) auction (auction) booking (booking) bundle (bundle) external (external) grouped (grouped) lottery (lottery) mix and match (mix-and-match) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) Taxonomies: Product Visibility: exclude_from_catalog (exclude_from_catalog) exclude_from_search (exclude_from_search) 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: #6 - /shop/ Cart: #7 - /cart/ Checkout: #8 - /checkout/ My account: #9 - /my-account/ Terms and conditions: ❌ Page not set Theme Name: Storefront Version: 3.5.0 Author URL: https://woocommerce.com/ 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: – Subscriptions WCS_DEBUG: ❌ Yes Subscriptions Mode: ✔ Live Subscriptions Live URL: https://kelwoo.test Subscription Statuses: wc-active: 11 wc-expired: 3 wc-on-hold: 9 wc-cancelled: 4 WooCommerce Account Connected: ✔ Yes Active Product Key: ❌ No Custom Retry Rules: ✔ No Custom Retry Rule Class: ✔ No Custom Raw Retry Rule: ✔ No Custom Retry Rule: ✔ No Retries Migration Status: ✔ Completed Report Cache Enabled: ❌ No Cache Update Failures: ❌ 3 failure Store Setup Country / State: United States (US) — Hawaii Subscriptions by Payment Gateway other: wc-on-hold: 2 wc-cancelled: 2 Stripe: wc-active: 11 wc-cancelled: 2 wc-expired: 3 wc-on-hold: 5 Payment Gateway Support Stripe: products refunds tokenization add_payment_method subscriptions subscription_cancellation subscription_suspension subscription_reactivation subscription_amount_changes subscription_date_changes subscription_payment_method_change subscription_payment_method_change_customer subscription_payment_method_change_admin multiple_subscriptions pre-orders Check payments: products PayPal Checkout: products refunds subscriptions subscription_cancellation subscription_reactivation subscription_suspension multiple_subscriptions subscription_payment_method_change_customer subscription_payment_method_change_admin subscription_amount_changes subscription_date_changes Square: products card_types customer_decline_messages payment_form authorization charge charge-virtual capture_charge refunds voids customer_id tokenization add_payment_method token_editor subscriptions subscription_suspension subscription_cancellation subscription_reactivation subscription_amount_changes subscription_date_changes multiple_subscriptions subscription_payment_method_change_customer subscription_payment_method_change_admin pre-orders Cash on delivery: products Square Environment: Production Tokenization Enabled: ✔ Debug Mode: Save to Log Action Scheduler Canceled: 2 Oldest: 2021-01-27 11:10:58 +0900 Newest: 2021-02-05 15:45:21 +0900 Complete: 2,553 Oldest: 2021-01-19 16:29:28 +0900 Newest: 2021-02-19 16:24:15 +0900 Failed: 4 Oldest: 2020-11-12 17:53:12 +0900 Newest: 2021-01-12 10:59:13 +0900 Pending: 23 Oldest: 2021-02-19 16:25:09 +0900 Newest: 2022-01-20 14:00:39 +0900 ```
phillipcornwell commented 3 years ago

another report on 28402396-hc

Also found that PayPal Checkout isn't in the list of compatible payment gateways: https://docs.woocommerce.com/document/pre-orders/#section-20