• Resolved niteshpandit

    (@niteshpandit)


    Hello,

    we are using this for stripe payment. We are accepting payment on woocommerce order pay page order-pay/7233/?pay_for_order=true&key=wc_order_hjaF7PXDJznbE.

    When we click on place order button we getting below error.

    PHP Fatal error: Uncaught Error: Call to undefined method Stripe\PaymentIntent::toArray() in /home/carilyuw/public_html/wp-content/plugins/woo-stripe-payment/includes/class-wc-stripe-payment-intent.php:52
    Stack trace: 0 /home/carilyuw/public_html/wp-content/plugins/woo-stripe-payment/includes/controllers/class-wc-stripe-controller-checkout.php(184): WC_Stripe_Payment_Intent->process_payment(Object(Automattic\WooCommerce\Admin\Overrides\Order)) 1 /home/carilyuw/public_html/wp-includes/rest-api/class-wp-rest-server.php(1230): WC_Stripe_Controller_Checkout->process_order_pay(Object(WP_REST_Request)) 2 /home/carilyuw/public_html/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/wc-stripe/v1/o…’, Array, NULL) 3 /home/carilyuw/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch(Object(WP_REST_Request)) 4 /home/carilyuw/public_html/wp-includes/rest-api.php(428): WP_REST_Server->serve_request(‘/wc-stripe/v1/o…’) 5 /home/car in /home/carilyuw/public_html/wp-content/plugins/woo-stripe-payment/includes/class-wc-stripe-payment-intent.php on line 52

    On 52 lide code is below

    $order->update_meta_data( WC_Stripe_Constants::PAYMENT_INTENT, WC_Stripe_Utils::sanitize_intent( $intent->toArray() ) );

    If i am replace this code with $order->update_meta_data(WC_Stripe_Constants::PAYMENT_INTENT, WC_Stripe_Utils::sanitize_intent($intent->jsonSerialize())); then it is working but i dont want to check core file of plugin so please can you for me?

    i am attaching system report below so please check and reply as soon as possible

    WordPress Environment<br><br>WordPress address (URL): https://cariboutourism.com<br>Site address (URL): https://cariboutourism.com<br>WC Version: 8.9.2<br>REST API Version: ? 8.9.2<br>Action Scheduler Version: ? 3.7.4<br>Log Directory Writable: ?<br>WP Version: 6.5.4<br>WP Multisite: –<br>WP Memory Limit: 1 GB<br>WP Debug Mode: ?<br>WP Cron: ?<br>Language: en_US<br>External object cache: – Server Environment<br><br>Server Info: LiteSpeed<br>PHP Version: 7.4.33<br>PHP Post Max Size: 1 GB<br>PHP Time Limit: 1500<br>PHP Max Input Vars: 2000<br>cURL Version: 7.87.0<br>OpenSSL/1.1.1w<br><br>SUHOSIN Installed: –<br>MySQL Version: 5.5.5-10.6.17-MariaDB-cll-lve-log<br>Max Upload Size: 1 GB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database<br><br>WC Database Version: 8.9.2<br>WC Database Prefix: wpv1_<br>Total Database Size: 46.71MB<br>Database Data Size: 41.59MB<br>Database Index Size: 5.12MB<br>wpv1_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wpv1_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_woocommerce_order_itemmeta: Data: 0.09MB + Index: 0.11MB + Engine InnoDB<br>wpv1_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wpv1_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_actionscheduler_actions: Data: 0.16MB + Index: 0.14MB + Engine InnoDB<br>wpv1_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_actionscheduler_logs: Data: 0.08MB + Index: 0.03MB + Engine InnoDB<br>wpv1_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_comments: Data: 0.06MB + Index: 0.09MB + Engine InnoDB<br>wpv1_create_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_fbv: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_fbv_attachment_folder: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_group_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_litespeed_url: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_litespeed_url_file: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_loginizer_logs: Data: 0.00MB + Index: 0.01MB + Engine MyISAM<br>wpv1_mailpoet_automations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_mailpoet_automation_runs: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>wpv1_mailpoet_automation_run_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_mailpoet_automation_run_subjects: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_automation_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_mailpoet_automation_versions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_mailpoet_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_newsletters: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_newsletter_templates: Data: 2.52MB + Index: 0.00MB + Engine InnoDB<br>wpv1_mailpoet_scheduled_tasks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_scheduled_task_subscribers: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_sending_queues: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>wpv1_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>wpv1_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_subscribers: Data: 0.02MB + Index: 0.23MB + Engine InnoDB<br>wpv1_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_subscriber_segment: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_subscriber_tag: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_map_locations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_newsletter: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_newsletter_emails: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_newsletter_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_newsletter_sent: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_newsletter_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_newsletter_user_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_newsletter_user_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_options: Data: 5.25MB + Index: 0.08MB + Engine InnoDB<br>wpv1_postmeta: Data: 19.52MB + Index: 0.59MB + Engine InnoDB<br>wpv1_posts: Data: 0.41MB + Index: 0.22MB + Engine InnoDB<br>wpv1_revslider_css: Data: 0.13MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_css_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_revslider_sliders: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_sliders_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_static_slides: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_tourmaster_order: Data: 0.38MB + Index: 0.00MB + Engine InnoDB<br>wpv1_tourmaster_review: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_tourmaster_room_booking: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_tourmaster_room_order: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_tourmaster_room_review: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_tourmaster_room_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_usermeta: Data: 0.08MB + Index: 0.03MB + Engine InnoDB<br>wpv1_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB<br>wpv1_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_wc_orders: Data: 0.08MB + Index: 0.11MB + Engine InnoDB<br>wpv1_wc_orders_meta: Data: 0.06MB + Index: 0.13MB + Engine InnoDB<br>wpv1_wc_order_addresses: Data: 0.05MB + Index: 0.06MB + Engine InnoDB<br>wpv1_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_wc_order_operational_data: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>wpv1_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wpv1_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wpv1_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wpv1_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB<br>wpv1_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wfblockediplog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfblocks7: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfconfig: Data: 2.18MB + Index: 0.01MB + Engine MyISAM<br>wpv1_wfcrawlers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wffilechanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wffilemods: Data: 4.71MB + Index: 0.59MB + Engine MyISAM<br>wpv1_wfhits: Data: 0.01MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfhoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfissues: Data: 0.01MB + Index: 0.01MB + Engine MyISAM<br>wpv1_wfknownfilelist: Data: 3.36MB + Index: 0.18MB + Engine MyISAM<br>wpv1_wflivetraffichuman: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wflocs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wflogins: Data: 0.01MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wpv1_wfls_role_counts: Data: 0.00MB + Index: 0.00MB + Engine MEMORY<br>wpv1_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_wfnotifications: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfpendingissues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfreversecache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfsecurityevents: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfsnipcache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfstatus: Data: 0.12MB + Index: 0.06MB + Engine MyISAM<br>wpv1_wftrafficrates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wfwaffailures: Data: 0.00MB + Index: 0.00MB + Engine MyISAM<br>wpv1_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wpv1_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB Post Type Counts<br><br>acf-field: 7<br>acf-field-group: 2<br>attachment: 310<br>customize_changeset: 8<br>mailpoet_page: 1<br>nav_menu_item: 172<br>page: 154<br>payouts: 1<br>personnel: 8<br>post: 17<br>product: 3<br>revision: 145<br>room: 6<br>shop_order_placehold: 220<br>tour: 24<br>tour_coupon: 2<br>tour_service: 8<br>wp_font_face: 33<br>wp_font_family: 12<br>wp_global_styles: 1<br>wp_navigation: 1<br>wpcf7_contact_form: 4 Security<br><br>Secure connection (HTTPS): ?<br>Hide errors from visitors: ? Active Plugins (22)<br><br>Advanced Custom Fields: by WP Engine – 6.3.1<br>All-in-One WP Migration: by ServMask – 7.83<br>Contact Form 7: by Takayuki Miyoshi – 5.9.5<br>Custom Post Type UI: by WebDevStudios – 1.16.0<br>Disable Comments: by WPDeveloper – 2.4.6<br>Duplicate Page: by mndpsingh287 – 4.5.3<br>Envato Market: by Envato – 2.0.11<br>Goodlayers Personnel Post Type: by Goodlayers – 1.3.1<br>Goodlayers Portfolio Post Type: by Goodlayers – 1.3.8<br>Goodlayers Twitter: by Goodlayers – 1.0.3<br>Goodlayers Core: by Goodlayers – 1.9.8<br>Newsletter: by Stefano Lissa & The Newsletter Team – 8.3.8<br>Really Simple SSL: by Really Simple Plugins – 8.1.3<br>Slider Revolution: by ThemePunch – 6.6.20<br>Tour Master: by Goodlayers – 5.2.7<br>User Role Editor: by Vladimir Garagulya – 4.64.2<br>WebP Express: by Bj?rn Rosell – 0.25.9<br>Payment Plugins for Stripe WooCommerce: by Payment Plugins<br>[email protected] – 3.3.71<br><br>WooCommerce: by Automattic – 8.9.2<br>Wordfence Security: by Wordfence – 7.11.6<br>WP Maps: by flippercode – 4.6.0<br>WP Mail SMTP: by WP Mail SMTP – 4.0.1 Inactive Plugins (3)<br><br>Deposit & Partial Payment Solution for WooCommerce - WpDepositly | MagePeople: by MagePeople Team – 2.2.5<br>Deposits & Partial Payments for WooCommerce: by Acowebs – 1.1.21<br>LiteSpeed Cache: by LiteSpeed Technologies – 6.2.0.1 Settings<br><br>API Enabled: –<br>Force SSL: –<br>Currency: USD ($)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>variable (variable)<br><br>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)<br><br>Connected to WooCommerce.com: –<br>Enforce Approved Product Download Directories: ?<br>HPOS feature enabled: ?<br>Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore<br>HPOS data sync enabled: – Logging<br><br>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 632 KB WC Pages<br><br>Shop base: #5072 - /shop/<br>Cart: #6565 - /cart-3/<br>Checkout: #6566 - /checkout-3/<br>My account: #1325 - /my-account-2/<br>Terms and conditions: ? Page not set Theme<br><br>Name: Travel Tour Child<br>Version: 1.0.0<br>Author URL: https://goodlayers.com<br>Child Theme: ?<br>Parent Theme Name: TravelTour<br>Parent Theme Version: 5.1.9<br>Parent Theme Author URL: https://www.goodlayers.com<br>WooCommerce Support: ? Templates<br><br>Overrides: traveltour/archive-product.php<br>traveltour-child/woocommerce/checkout/thankyou.php<br>traveltour/woocommerce/single-product/meta.php<br>traveltour/woocommerce/single-product/price.php<br>traveltour/woocommerce/single-product/rating.php<br>traveltour/woocommerce/single-product/related.php<br>traveltour/woocommerce/single-product/review-meta.php<br>traveltour/woocommerce/single-product/tabs/tabs.php<br>traveltour/woocommerce/single-product/title.php Admin<br><br>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-variation-management<br>product-virtual-downloadable<br>product-external-affiliate<br>product-grouped<br>product-linked<br>product-pre-publish-modal<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br><br>Disabled Features: minified-js<br>new-product-management-experience<br>settings<br>async-product-editor-category-field<br>launch-your-store<br><br>Daily Cron: ? Next scheduled: 2024-06-11 06:52:07 +00:00<br>Options: ?<br>Notes: 69<br>Onboarding: - Action Scheduler<br><br>Complete: 411<br>Oldest: 2024-05-10 11:51:10 +0000<br>Newest: 2024-06-10 08:49:50 +0000<br><br>Failed: 3<br>Oldest: 2024-05-10 11:06:08 +0000<br>Newest: 2024-06-10 07:28:03 +0000<br><br>Pending: 4<br>Oldest: 2024-06-10 10:45:58 +0000<br>Newest: 2024-06-10 11:25:18 +0000 Status report information<br><br>Generated at: 2024-06-10 09:05:37 +00:00<br>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @niteshpandit

    The most likely explanation is you’re using another plugin that’s loading an older version of the Stripe PHP library, which doesn’t have that method. Here is a link to this Stripe plugin’s code, where you can see the toArray function is defined:

    https://plugins.trac.www.ads-software.com/browser/woo-stripe-payment/tags/3.3.71/vendor/stripe/stripe-php/lib/StripeObject.php#L468

    https://plugins.trac.www.ads-software.com/browser/woo-stripe-payment/tags/3.3.71/vendor/stripe/stripe-php/lib/StripeObject.php#L457

    The use of toArray has been in place for a very long time. You can see here, Stripe references that method in version 7.0.0.

    Kind Regards,

    Thread Starter niteshpandit

    (@niteshpandit)

    hello,

    We are using latest version https://www.ads-software.com/plugins/woo-stripe-payment/ plugin we are still getting same error so how can i solve this ?

    also i have check the toArray() function is define

    public function toArray()
    {
    $maybeToArray = function ($value) {
    if (null === $value) {
    return null;
    }

            return \is_object($value) && \method_exists($value, 'toArray') ? $value->toArray() : $value;
        };
    
        return \array_reduce(\array_keys($this->_values), function ($acc, $k) use ($maybeToArray) {
            if ('_' === \substr((string) $k, 0, 1)) {
                return $acc;
            }
            $v = $this->_values[$k];
            if (Util\Util::isList($v)) {
                $acc[$k] = \array_map($maybeToArray, $v);
            } else {
                $acc[$k] = $maybeToArray($v);
            }
    
            return $acc;
        }, []);
    }
    Plugin Author Payment Plugins

    (@mrclayton)

    We are using latest version?https://www.ads-software.com/plugins/woo-stripe-payment/?plugin we are still getting same error so how can i solve this ?

    This error isn’t related to the Stripe plugin version you’re using. Per my previous reply, it’s most likely caused by the an older version of the Stripe PHP SDK being loaded from another plugin.

    I can see from your post history that you have been using this Stripe plugin for some time. If it was an issue caused by our plugin, you would have gotten this error months ago. That call to toArray() has been in place for over year.

    also i have check the toArray() function is define

    Yes, it’s defined within the Stripe PHP version that this plugin is using, but that doesn’t mean it’s defined in a 3rd party plugin that’s loading an older version of the library. PHP loads the first occurance of a class into memory and then re-uses it.

    Kind Regards

    Thread Starter niteshpandit

    (@niteshpandit)

    hello

    How can we solve this isssue can you give me suggetion?

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @niteshpandit

    I would recommend finding the plugin that contains an old version of the Stripe PHP library. Once you have found the problematic plugin you can contact their developers and ask them to update their plugin’s Stripe PHP SDK dependency.

    You could also change the order of activation once you find the plugin and make sure the Stripe plugin loads first.

    Kind Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Fatal error: Uncaught Error: Call to undefined method Stripe\PaymentIntent:’ is closed to new replies.