• Resolved phatman

    (@phatman)


    Hi, I’ve just started getting the following error on the settings page in admin:

    Fatal error: Uncaught Error: Call to undefined function apimatic\jsonmapper\parse_ini_file() in /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/vendor/apimatic/jsonmapper/src/JsonMapper.php:119 Stack trace: #0 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/vendor/square/square/src/ApiHelper.php(34): apimatic\jsonmapper\JsonMapper->__construct() #1 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/vendor/square/square/src/ApiHelper.php(120): Square\ApiHelper::getJsonMapper() #2 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/vendor/square/square/src/Apis/LocationsApi.php(82): Square\ApiHelper::mapClass(Object(Square\Http\HttpRequest), Object(Square\Http\HttpResponse), Object(stdClass), ‘ListLocationsRe…’) #3 [internal function]: Square\Apis\LocationsApi->listLocations() #4 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/API.php(853): call_user_func_array(Array, Array) #5 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/API.php(743): WooCommerce\Square\API->do_square_request(Object(Square\Apis\LocationsApi), ‘listLocations’, Array) #6 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/API.php(613): WooCommerce\Square\API->perform_request(Object(WooCommerce\Square\API\Requests\Locations)) #7 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/Settings.php(717): WooCommerce\Square\API->get_locations() #8 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/Settings.php(325): WooCommerce\Square\Settings->get_locations() #9 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-settings-api.php(87): WooCommerce\Square\Settings->get_form_fields() #10 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/Admin/Settings_Page.php(86): WC_Settings_API->admin_options() #11 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/includes/Admin/Settings_Page.php(74): WooCommerce\Square\Admin\Settings_Page->output_general_section() #12 /home/xxxxxxxxx/public_html/wp-includes/class-wp-hook.php(308): WooCommerce\Square\Admin\Settings_Page->output(”) #13 /home/xxxxxxxxx/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #14 /home/xxxxxxxxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #15 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce/includes/admin/views/html-admin-settings.php(40): do_action(‘woocommerce_set…’) #16 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-settings.php(154): include(‘/home/xxxxxxxxx/…’) #17 /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php(287): WC_Admin_Settings::output() #18 /home/xxxxxxxxx/public_html/wp-includes/class-wp-hook.php(308): WC_Admin_Menus->settings_page(”) #19 /home/xxxxxxxxx/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #20 /home/xxxxxxxxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #21 /home/xxxxxxxxx/public_html/wp-admin/admin.php(259): do_action(‘woocommerce_pag…’) #22 {main} thrown in /home/xxxxxxxxx/public_html/wp-content/plugins/woocommerce-square/vendor/apimatic/jsonmapper/src/JsonMapper.php on line 119
    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    Any ideas? Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter phatman

    (@phatman)

    Just got this email…

    Hi!

    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, WooCommerce Square.

    Saif

    (@babylon1999)

    Hello @phatman,

    Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Look forward to hearing back from you.

    Thread Starter phatman

    (@phatman)

    WordPress Environment
    
    WordPress address (URL): https://www.dubberware.com
    Site address (URL): https://www.dubberware.com
    WC Version: 7.2.2
    REST API Version: ?</img> 7.2.2
    WC Blocks Version: ?</img> 8.9.2
    Action Scheduler Version: ?</img> 3.4.0
    Log Directory Writable: ?</img>
    WP Version: 6.1.1
    WP Multisite: –
    WP Memory Limit: 1 GB
    WP Debug Mode: ?</img>
    WP Cron: ?</img>
    Language: en_GB
    External object cache: –
    
    Server Environment
    
    Server Info: Apache
    PHP Version: 8.0.26
    PHP Post Max Size: 15 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.86.0
    OpenSSL/1.1.1s
    
    SUHOSIN Installed: –
    MySQL Version: 10.3.37-MariaDB
    Max Upload Size: 15 MB
    Default Timezone is UTC: ?</img>
    fsockopen/cURL: ?</img>
    SoapClient: ?</img>
    DOMDocument: ?</img>
    GZip: ?</img>
    Multibyte String: ?</img>
    Remote Post: ?</img>
    Remote Get: ?</img>
    
    Database
    
    WC Database Version: 7.2.2
    WC Database Prefix: dub_
    Total Database Size: 58.36MB
    Database Data Size: 39.01MB
    Database Index Size: 19.35MB
    dub_woocommerce_sessions: Data: 1.02MB + Index: 0.02MB + Engine InnoDB
    dub_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    dub_woocommerce_order_items: Data: 0.06MB + Index: 0.02MB + Engine InnoDB
    dub_woocommerce_order_itemmeta: Data: 0.31MB + Index: 0.27MB + Engine InnoDB
    dub_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    dub_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_actionscheduler_actions: Data: 3.52MB + Index: 1.48MB + Engine InnoDB
    dub_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_actionscheduler_logs: Data: 3.52MB + Index: 0.84MB + Engine InnoDB
    dub_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_comments: Data: 0.20MB + Index: 0.22MB + Engine InnoDB
    dub_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_options: Data: 4.13MB + Index: 0.30MB + Engine InnoDB
    dub_postmeta: Data: 16.55MB + Index: 11.03MB + Engine InnoDB
    dub_posts: Data: 2.52MB + Index: 0.89MB + Engine InnoDB
    dub_termmeta: Data: 0.11MB + Index: 0.13MB + Engine InnoDB
    dub_terms: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    dub_term_relationships: Data: 2.52MB + Index: 1.52MB + Engine InnoDB
    dub_term_taxonomy: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    dub_tm_taskmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_tm_tasks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_usermeta: Data: 1.52MB + Index: 0.09MB + Engine InnoDB
    dub_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    dub_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_wc_customer_lookup: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    dub_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_wc_order_product_lookup: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    dub_wc_order_stats: Data: 0.05MB + Index: 0.05MB + Engine InnoDB
    dub_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    dub_wc_product_attributes_lookup: Data: 0.19MB + Index: 0.19MB + Engine MyISAM
    dub_wc_product_download_directories: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    dub_wc_product_meta_lookup: Data: 1.52MB + Index: 1.27MB + Engine InnoDB
    dub_wc_rate_limits: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    dub_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    dub_wfpklist_template_data: Data: 0.03MB + Index: 0.00MB + Engine InnoDB
    dub_woobe_history: Data: 0.30MB + Index: 0.22MB + Engine MyISAM
    dub_woobe_history_bulk: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    dub_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_xyz_ips_short_code: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_yith_wapo_addons: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_yith_wapo_blocks: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_yith_wapo_groups: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_yith_wapo_types: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    dub_yith_wccl_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    
    Post Type Counts
    
    attachment: 573
    chart: 1
    custom_css: 1
    customize_changeset: 1
    ml-slide: 15
    ml-slider: 4
    nav_menu_item: 43
    page: 18
    post: 2
    product: 323
    product_variation: 5473
    revision: 7
    shop_order: 197
    shop_order_refund: 1
    wcpa_pt_forms: 7
    wp_global_styles: 1
    
    Security
    
    Secure connection (HTTPS): ?</img>
    Hide errors from visitors: ?</img>
    
    Active Plugins (26)
    
    AddToAny Share Buttons: by AddToAny – 1.8.5
    Facebook for WooCommerce: by Facebook – 3.0.7
    Homepage Control: by WooThemes – 2.0.3
    Insert PHP Code Snippet: by xyzscripts.com – 1.3.3
    Limit log in attempts reloaded: by Limit log in attempts reloaded – 2.25.10
    MetaSlider: by MetaSlider – 3.28.2
    WooCommerce PDF Invoices, Packing Slips, Delivery Notes and Shipping Labels: by WebToffee – 4.0.3
    Product Size Chart for Woocommerce: by Ciobanu George – 1.1.3
    PW WooCommerce Bulk Edit: by Pimwick
    LLC – 2.108
    
    Storefront Hamburger Menu: by WooCommerce – 1.2.2
    Category Order and Taxonomy Terms Order: by Nsp-Code – 1.7.4
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.22.24
    
    WooCommerce Weight Based Shipping: by weightbasedshipping.com – 5.4.0
    Woo Address Printer: by Steve Tristram ~ IMAGE ROOM – 0.2
    BEAR – Bulk Editor and Products Manager Professional for WooCommerce: by realmag777 – 1.1.3
    WooCommerce Custom Product Addons (Free): by Acowebs – 2.7.1
    Woo Quick View: by Arshid – 1.1.0
    Variation Swatches for WooCommerce: by Emran Ahmed – 2.0.17
    WooCommerce PayPal Payments: by WooCommerce – 2.0.1
    WooCommerce Shipping & Tax: by WooCommerce – 2.1.1
    WooCommerce Square: by WooCommerce – 3.4.2
    WooCommerce: by Automattic – 7.2.2
    WP Mail SMTP: by WPForms – 3.7.0
    WP-Optimize - Clean, Compress, Cache: by David Anderson
    Ruhani Rabin
    Team Updraft – 3.2.10
    
    WP Post Popup: by Allure Web Solutions – 3.7.1
    YITH WooCommerce Product Add-ons & Extra Options: by YITH – 2.17.0
    
    Inactive Plugins (0)
    
    Dropin Plugins (2)
    
    advanced-cache.php: advanced-cache.php
    maintenance.php: maintenance.php
    
    Settings
    
    API Enabled: –
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: simple (simple)
    grouped (grouped)
    variable (variable)
    external (external)
    
    Taxonomies: Product Visibility: exclude-from-search (exclude-from-search)
    exclude-from-catalog (exclude-from-catalog)
    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: –
    Order datastore: WC_Order_Data_Store_CPT
    
    WC Pages
    
    Shop base: #7189 - /shop/
    Basket: #7191 - /basket/
    Checkout: #7193 - /checkout/
    My account: #7195 - /account/
    Terms and conditions: #7187 - /terms-conditions/
    
    Theme
    
    Name: Woo Storefront Child Theme
    Version: 1.0.1
    Author URL:
    Child Theme: ?</img>
    Parent Theme Name: Storefront
    Parent Theme Version: 4.2.0
    Parent Theme Author URL: https://woocommerce.com/
    WooCommerce Support: ?</img>
    
    Templates
    
    Overrides: –
    
    WooCommerce PayPal Payments
    
    Onboarded: ?</img>
    Shop country code: GB
    WooCommerce currency supported: ?</img>
    Advanced Card Processing available in country: ?</img>
    Pay Later messaging available in country: ?</img>
    Webhook status: ?</img>
    Vault enabled: ?</img>
    Logging enabled: –
    Reference Transactions: –
    Used PayPal Checkout plugin: ?</img>
    Tracking enabled: –
    
    Square
    
    Environment: Production
    Tokenization Enabled: –
    Debug Mode: Off
    
    Admin
    
    Enabled Features: activity-panels
    analytics
    coupons
    customer-effort-score-tracks
    experimental-products-task
    experimental-import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    multichannel-marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    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
    
    Daily Cron: ?</img> Next scheduled: 2023-01-11 09:44:30 +00:00
    Options: ?</img>
    Notes: 9
    Onboarding: completed
    
    Action Scheduler
    
    Complete: 1,256
    Oldest: 2022-12-10 16:30:57 +0000
    Newest: 2023-01-10 15:40:32 +0000
    
    Failed: 6,197
    Oldest: 2021-07-08 20:12:16 +0100
    Newest: 2023-01-10 15:40:32 +0000
    
    Pending: 5
    Oldest: 2023-01-10 21:01:02 +0000
    Newest: 2023-01-16 15:28:52 +0000
    
    Status report information
    
    Generated at: 2023-01-10 16:06:41 +00:00
    `
    Saif

    (@babylon1999)

    Hello @phatman,

    Your report looks healthy I also didn’t find any similar recent cases. Is the error showing when only WooCommerce and Square plugins are active? Make sure to switch to the Storefront theme as well in case it’s a theme conflict.

    If you’re not comfortable doing all of this on the live version of your site, you can create a staging environment using WP-STAGING.

    Let us know your findings!


    Thread Starter phatman

    (@phatman)

    The plugin has been working fine with my theme. The error is occurring with both WordPress 6.0.3 and 6.1.1

    The error only shows on Woocommerce > Settings > Square page. However, orders become perpetually pending.

    …switching to the storefront theme makes no difference

    • This reply was modified 1 year, 10 months ago by phatman.

    Hi @phatman

    The error is occurring with both WordPress 6.0.3 and 6.1.1

    Can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?

    If you don’t already have a screenshot service installed, you can try https://snipboard.io or https://skitch.com/. You can share the direct link to the image as a response to this topic.

    …switching to the storefront theme makes no difference

    Just to confirm that you’ve switched to the default Storefront theme and only WooCommerce and Square plugins are enabled and see if this resolves the issue?

    If so, then this kind of problem is usually caused by your theme or a third-party plugin present on your site. We can run a conflict test to verify this. I’d recommend cloning your site to a staging environment and performing the tests described on this guide without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.

    If this was caused by a third-party plugin present on your site, it would be best to reach out to the developers for further assistance here.

    Let us know how it goes!

    Thread Starter phatman

    (@phatman)

    https://snipboard.io/4ovGtj.jpg

    Yes, same error with storefront theme, WooCommerce and Square plugin active.

    Hello,

    Fatal error: Uncaught Error: Call to undefined function apimatic\jsonmapper\parse_ini_file()...

    The?parse_ini_file()?is a?built-in function in PHP, it is possible that your web host has disabled this function, perhaps to help with security, this could be a reason for this error. I’d recommend to reach out to your web host to see if they are able to allow the?parse_ini_file?function, as it appears that the Square for WooCommerce?extension uses it.

    Let us know how that goes for you.

    Thread Starter phatman

    (@phatman)

    Ok, I’ve cut my loses and switched over to accepting payments with Stripe. I couldn’t get to the bottom of why it should suddenly stop working – maybe a server update killed it. I may try it again at a later date. Thanks!

    Hi @phatman
    It could be possible, I am going to mark this resolve. If you have any new question, please create a new ticket.

    Cheers!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Critical Error’ is closed to new replies.