• Resolved website-update-services

    (@website-update-services)


    Hi,

    I am setting up a site that uses Stripe. In testing all is fine until I test purchase a Voucher Product (WooCommerce PDF Product Vouchers). The voucher PDF is generated, email with Voucher attached sent to customer and the sale is recorded as a WC order. However on the Checkout Page where it is supposed to give a confirmation message, I get the error “SyntaxError: JSON.parse Error: Invalid character at position:1” and the cart is still populated with the selected product.

    I looked in the WC logs and found this “CRITICAL Call to a member function get_name() on null”

    I did a search on get_name() and found 3 instances in the file class-wc-stripe-payment-request.php.

    My hosting co were kind enough to investigate this for me to rule out anything their end and this is what they have to say…

    “Looking at the script that the “Unable to fix malformed JSON” console message comes from, the JSON apparently is supposed to be displayed right after that message in the console, but it isn’t, so presumably there isn’t any there. There’s no sign of any more errors on the server itself, and the “Call to a
    member function get_name() on null” errors seem to be a result of this rather than the cause.

    Both WooCommerce and the Stripe payment gateway plugin itself are directly supported by WooCommerce. I’d recommend you get in touch with them and see if they can suggest what the problem might be.

    They do recommend switching to a default WordPress theme and disabling all unrelated plugins to check for conflicts first, though. Have you tried that yet?”

    In answer to the Theme & Plugins, yes, I have tested using StoreFront theme and disabled the non Woo plugins – error was the same.

    Can you suggest how to fix the situation?

    Thanking you in advance, J

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support melinda a11n

    (@melindahelt)

    Automattic Happiness Engineer

    Hi there!

    Can you please respond and include a copy of your site’s status report.

    Thread Starter website-update-services

    (@website-update-services)

    Hi Melinda,

    Thanks for reply, status report below. Please mark as private as I would not like sharing it with the world forever.

    Ta, J

    
    ### WordPress Environment ###
    
    Home URL: https://galwayexplored.ie
    Site URL: https://galwayexplored.ie
    WC Version: 3.4.2
    Log Directory Writable: ✔
    WP Version: 4.9.6
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: ✔
    WP Cron: ✔
    Language: en_GB
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 5.6.36 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version
    PHP Post Max Size: 12 MB
    PHP Time Limit: 90
    PHP Max Input Vars: 1000
    cURL Version: 7.59.0
    OpenSSL/1.0.2o
    
    SUHOSIN Installed: –
    MySQL Version: 5.6.39-log
    Max Upload Size: 12 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 3.4.2
    WC Database Prefix: gex_
    MaxMind GeoIP Database: ✔
    Total Database Size: 8.02MB
    Database Data Size: 6.05MB
    Database Index Size: 1.97MB
    gex_woocommerce_sessions: Data: 0.03MB + Index: 0.00MB
    gex_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_order_itemmeta: Data: 0.01MB + Index: 0.02MB
    gex_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB
    gex_woocommerce_log: Data: 0.00MB + Index: 0.00MB
    gex_commentmeta: Data: 0.00MB + Index: 0.01MB
    gex_comments: Data: 0.01MB + Index: 0.01MB
    gex_db7_forms: Data: 0.00MB + Index: 0.00MB
    gex_failed_jobs: Data: 0.00MB + Index: 0.00MB
    gex_links: Data: 0.00MB + Index: 0.00MB
    gex_mailchimp_carts: Data: 0.00MB + Index: 0.00MB
    gex_options: Data: 1.05MB + Index: 0.12MB
    gex_postmeta: Data: 0.39MB + Index: 0.24MB
    gex_posts: Data: 0.92MB + Index: 0.07MB
    gex_psninja_amdd: Data: 3.56MB + Index: 1.35MB
    gex_psninja_amdd_cache: Data: 0.00MB + Index: 0.00MB
    gex_psninja_urls: Data: 0.00MB + Index: 0.00MB
    gex_queue: Data: 0.01MB + Index: 0.00MB
    gex_redirection_404: Data: 0.01MB + Index: 0.01MB
    gex_redirection_groups: Data: 0.00MB + Index: 0.00MB
    gex_redirection_items: Data: 0.00MB + Index: 0.01MB
    gex_redirection_logs: Data: 0.00MB + Index: 0.01MB
    gex_social_users: Data: 0.00MB + Index: 0.00MB
    gex_termmeta: Data: 0.00MB + Index: 0.01MB
    gex_terms: Data: 0.00MB + Index: 0.01MB
    gex_term_relationships: Data: 0.01MB + Index: 0.02MB
    gex_term_taxonomy: Data: 0.00MB + Index: 0.01MB
    gex_usermeta: Data: 0.02MB + Index: 0.02MB
    gex_users: Data: 0.00MB + Index: 0.01MB
    gex_wcfm_daily_analysis: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_detailed_analysis: Data: 0.03MB + Index: 0.01MB
    gex_wcfm_enquiries: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_enquiries_meta: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_following_followers: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_messages: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_messages_modifier: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_messages_stat: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_support: Data: 0.00MB + Index: 0.00MB
    gex_wcfm_support_response: Data: 0.00MB + Index: 0.00MB
    gex_wcmp_cust_answers: Data: 0.00MB + Index: 0.00MB
    gex_wcmp_cust_questions: Data: 0.00MB + Index: 0.00MB
    gex_wcmp_products_map: Data: 0.00MB + Index: 0.00MB
    gex_wcmp_vendor_orders: Data: 0.00MB + Index: 0.00MB
    gex_wcmp_visitors_stats: Data: 0.00MB + Index: 0.02MB
    gex_wc_booking_relationships: Data: 0.00MB + Index: 0.00MB
    gex_wc_download_log: Data: 0.00MB + Index: 0.00MB
    gex_wc_webhooks: Data: 0.00MB + Index: 0.00MB
    gex_yith_wcwl: Data: 0.00MB + Index: 0.00MB
    gex_yith_wcwl_lists: Data: 0.00MB + Index: 0.01MB
    
    ### Post Type Counts ###
    
    attachment: 30
    blocks: 8
    customize_changeset: 25
    dc_commission: 32
    featured_item: 8
    global_product_addon: 2
    jetpack_migration: 2
    jp_img_sitemap: 2
    jp_sitemap: 2
    jp_sitemap_master: 2
    nav_menu_item: 39
    page: 83
    post: 10
    product: 64
    product_variation: 2
    revision: 182
    shop_order: 32
    wc_booking: 1
    wc_voucher: 26
    wc_voucher_template: 3
    wcmp_vendorrequest: 1
    wpcf7_contact_form: 8
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ❌Error messages should not be shown to visitors.
    
    ### Active Plugins (23) ###
    
    Archived Post Status: by Frankie Jarrett – 0.3.7
    Contact Form 7 MailChimp Extension: by Renzo Johnson – 0.4.50
    Contact Form 7: by Takayuki Miyoshi – 5.0.2
    Contact Form CFDB7: by Arshid – 1.2.2
    WC Marketplace: by WC Marketplace
    The Grey Parrots – 3.0.7
    
    Duplicate Post: by Enrico Battocchi – 3.2.2
    Google Analytics Dashboard for WP (GADWP): by ExactMetrics – 5.3.5
    Hello Dolly: by Matt Mullenweg – 1.7
    Jetpack by WordPress.com: by Automattic – 6.2.1
    MailChimp for WooCommerce: by MailChimp – 2.1.7 – Not tested with the active version of WooCommerce
    Marketplace Stripe Gateway: by WC Marketplace
    The Grey Parrots – 1.0.9 – Not tested with the active version of WooCommerce
    
    Nextend Social Login: by Nextendweb – 3.0.11
    Really Simple SSL: by Rogier Lankhorst – 3.0.1
    Redirection: by John Godley – 3.2
    Remove Category Base: by LittleBizzy – 1.0.5
    Theme Customisations: by WooThemes – 1.0.0
    WC Custom Add to Cart labels: by Rynaldo Stoltz – 1.1
    WooCommerce Frontend Manager: by WC Lovers – 4.1.4
    WooCommerce Stripe Gateway: by WooCommerce – 4.1.7
    WooCommerce PDF Product Vouchers: by SkyVerge – 3.4.2
    WooCommerce: by Automattic – 3.4.2
    WooSidebars: by WooThemes – 1.4.3
    YITH WooCommerce Wishlist: by YITHEMES – 2.2.2
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: booking (booking)
    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)
    
    ### WC Pages ###
    
    Shop base: #65 - /shop/
    Basket: #64 - /cart/
    Checkout: #63 - /checkout/
    My account: #62 - /my-account/
    Terms and conditions: ❌ Page not set
    
    ### Theme ###
    
    Name: Flatsome Child
    Version: 3.0
    Author URL: 
    Child Theme: ✔
    Parent Theme Name: Flatsome
    Parent Theme Version: 3.6.0
    Parent Theme Author URL: http://www.uxthemes.com/
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: flatsome/woocommerce/archive-product.php
    flatsome/woocommerce/cart/cart-empty.php
    flatsome/woocommerce/cart/cart.php
    flatsome/woocommerce/checkout/form-checkout.php
    flatsome/woocommerce/checkout/form-coupon.php
    flatsome/woocommerce/checkout/thankyou.php
    flatsome/woocommerce/content-product.php
    flatsome/woocommerce/content-product_cat.php
    flatsome/woocommerce/content-single-product.php
    flatsome/woocommerce/global/breadcrumb.php
    flatsome/woocommerce/global/quantity-input.php
    flatsome/woocommerce/global/wrapper-end.php
    flatsome/woocommerce/global/wrapper-start.php
    flatsome/woocommerce/loop/loop-end.php
    flatsome/woocommerce/loop/loop-start.php
    flatsome/woocommerce/loop/pagination.php
    flatsome/woocommerce/loop/result-count.php
    flatsome/woocommerce/loop/sale-flash.php
    flatsome/woocommerce/myaccount/form-login.php
    flatsome/woocommerce/myaccount/navigation.php
    flatsome/woocommerce/notices/error.php
    flatsome/woocommerce/notices/notice.php
    flatsome/woocommerce/notices/success.php
    flatsome/woocommerce/product-searchform.php
    flatsome/woocommerce/single-product/photoswipe.php
    flatsome/woocommerce/single-product/price.php
    flatsome/woocommerce/single-product/product-image.php
    flatsome/woocommerce/single-product/product-thumbnails.php
    flatsome/woocommerce/single-product/rating.php
    flatsome/woocommerce/single-product/related.php
    flatsome/woocommerce/single-product/review.php
    flatsome/woocommerce/single-product/sale-flash.php
    flatsome/woocommerce/single-product/share.php
    flatsome/woocommerce/single-product/short-description.php
    flatsome/woocommerce/single-product/tabs/tabs.php
    flatsome/woocommerce/single-product/title.php
    flatsome/woocommerce/single-product/up-sells.php
    flatsome/woocommerce/single-product-reviews.php
    flatsome/woocommerce/single-product.php
    
    
    Thread Starter website-update-services

    (@website-update-services)

    Hi,

    Issue now resolved, please mark status report as private.

    Thanks, J

    Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    There is no “private” status. Everything posted on these forums is fully public and will always remain so.

    If there is any personal data that you wish us to remove, you may tell us what data that is and we will do so, however I see nothing posted here that is personal and thus worth removing.

    However, in the future, be aware that we do not remove things from these forums for no reason. These are public forums. If you don’t want information to be public, do not post it here.

    Thread Starter website-update-services

    (@website-update-services)

    Thank you Samuel for your prompt reply, much appreciated.

    Have noted you comments regarding this and future postings, fingers crossed that the status report is not a security risk of some sort.

    Thanks again, J

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘SyntaxError: JSON.parse Error: Invalid character at position:1’ is closed to new replies.