• Resolved scarabm

    (@scarabm)


    Install of WC-Multi-Tiered Shipping Plugin on new/clean v4.8.1 WordPress with WooCommerce v3.1.2 results in a “500 Internal Server Error” any time you attempt to go to WOOCOMMERCE > SETTINGS in the WordPress Dashboard.

    PHP Error Log contains the following:

    PHP Fatal error: Uncaught Error: Call to undefined function money_format() in \wp-content\plugins\wc-multi-tiered-shipping\wc-multi-tiered-shipping.php:508

    Stack trace:
    #0 \wp-content\plugins\wc-multi-tiered-shipping\wc-multi-tiered-shipping.php(239): WC_Multi_Tiered_Shipping->cfd_get_shipping_costs_table()
    #1 \wp-content\plugins\wc-multi-tiered-shipping\wc-multi-tiered-shipping.php(90): WC_Multi_Tiered_Shipping->init_form_fields()
    #2 \wp-content\plugins\wc-multi-tiered-shipping\wc-multi-tiered-shipping.php(77): WC_Multi_Tiered_Shipping->init()
    #3 \wp-content\plugins\woocommerce\includes\class-wc-shipping.php(171): WC_Multi_Tiered_Shipping->__construct()
    #4 \wp-content\plugins\woocommerce\includes\class-wc-s in \wp-content\plugins\wc-multi-tiered-shipping\wc-multi-tiered-shipping.php on line 508

    Tried changing from PHP v7.0.23 to v5.6.31 but error remained until WC-Multi-Tiered-Shipping plugin was disabled. A clean reinstall of the WC-Multi-Tiered-Shipping plugin did not resolve the issue.

    Any suggestions on how to resolve this error?

    WooCommerce Status Report enclosed below for additional troubleshooting:

    ### WordPress Environment ###

    WC Version: 3.1.2
    Log Directory Writable: ?
    WP Version: 4.8.1
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US

    ### Server Environment ###

    Server Info: Microsoft-IIS/8.5
    PHP Version: 7.0.23
    PHP Post Max Size: 32 MB
    PHP Time Limit: -1
    PHP Max Input Vars: 1000
    cURL Version: 7.54.1
    OpenSSL/1.0.2k

    SUHOSIN Installed: –
    MySQL Version: 5.6.26
    Max Upload Size: 32 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?

    ### Database ###

    WC Database Version: 3.1.2
    woocommerce_sessions: ?
    woocommerce_api_keys: ?
    woocommerce_attribute_taxonomies: ?
    woocommerce_downloadable_product_permissions: ?
    woocommerce_order_items: ?
    woocommerce_order_itemmeta: ?
    woocommerce_tax_rates: ?
    woocommerce_tax_rate_locations: ?
    woocommerce_shipping_zones: ?
    woocommerce_shipping_zone_locations: ?
    woocommerce_shipping_zone_methods: ?
    woocommerce_payment_tokens: ?
    woocommerce_payment_tokenmeta: ?
    MaxMind GeoIP Database: ?

    ### Security ###

    Secure connection (HTTPS): ?
    Hide errors from visitors: ?

    ### Active Plugins (18) ###

    ManageWP – Worker: by ManageWP – 4.2.22
    All In One WP Security: by Tips and Tricks HQ
    Peter Ruhul Ivy – 4.2.8
    Bad Behavior: by Michael Hampton – 2.2.19
    Beaver Builder Plugin (Pro Version): by The Beaver Builder Team – 1.10.7.1
    Beaver Themer: by The Beaver Builder Team – 1.0.2
    Ultimate Addon for Beaver Builder: by Brainstorm Force – 1.6.3
    PowerPack for Beaver Builder: by Team IdeaBox – Beaver Addons – 1.3.1
    Better Search Replace: by Delicious Brains – 1.3
    Caldera Forms: by Caldera Labs – 1.5.5
    WooCommerce Menu Cart: by Jeremiah Prummer
    Ewout Fernhout – 2.6.0
    WooCommerce Product Fees: by Caleb Burks – 1.2
    WooCommerce: by Automattic – 3.1.2
    Yoast SEO: by Team Yoast – 5.3.3
    WP All Export Pro: by Soflyy – 1.4.7
    WP All Import Pro: by Soflyy – 4.4.9
    WP-Mail-SMTP: by Callum Macdonald – 0.10.1
    WP All Import – WooCommerce Add-On Pro: by Soflyy – 2.3.7
    WP All Import – Yoast WordPress SEO Add-On: by Soflyy – 1.1.5

    ### Settings ###

    API Enabled: ?
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: 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: #5 – /shop/
    Cart: #6 – /cart/
    Checkout: #7 – /checkout/
    My account: #8 – /my-account/

    ### Theme ###

    Name: Beaver Builder Child Theme
    Version: 1.0
    Author URL: https://www.fastlinemedia.com
    Child Theme: ?
    Parent Theme Name: Beaver Builder Theme
    Parent Theme Version: 1.6.2
    Parent Theme Author URL: https://www.wpbeaverbuilder.com/?utm_medium=bb-pro&utm_source=bb-theme&utm_campaign=themes-admin-page
    WooCommerce Support: ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The function money_format() is not available on windows, see https://stackoverflow.com/a/21508027

    Plugin needs to check the function is available before attempting to use it.

    This worked in version 1.0 on Windows. The issue was introduced in version 2.

    Thread Starter scarabm

    (@scarabm)

    Thank you so much for the fast reply Simon! You are absolutely correct, the PHP function money_format() doesn’t work on some flavors of Linux (like newer versions of Ubuntu or derivatives), FreeBSD, OpenBSD, or Windows. Since v1.0 of this plugin works for us so we will use that, although the code example in the link you provided does the trick as well.

    Plugin Author mhodges

    (@mhodges)

    Thanks for reporting the bug. I did not realize that money_format has OS dependencies. It’s use was implemented in this plugin’s 2.0 version to produce the Cost Table at the end of the setup section. Turns out, this design also has an issue with displaying the correct currency according to the WC settings. Investigating that issue I learned that WC provides a function for formatting the currency. I have been planning to introduce a fix that takes advantage of this. Due to the money_format error reported here, I will accelerate getting this fix into production. Thanks again for the bug report.

    Plugin Author mhodges

    (@mhodges)

    Will be replacing the money_format() with wp_price(). It introduces a table formatting error though. Once that is resolved I’ll release this fix as 2.0.1.

    Plugin Author mhodges

    (@mhodges)

    2.0.1 has been published to address this issue. Thanks again for reporting it.

    Thanks for your prompt attention to this. Works great!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Uncaught Error: Call to undefined function money_format()’ is closed to new replies.