Title: Fatal error cause when input the API setting
Last modified: May 27, 2021

---

# Fatal error cause when input the API setting

 *  Resolved [lmn40227](https://wordpress.org/support/users/lmn40227/)
 * (@lmn40227)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/)
 * when I try to save the setting, error shows:
 * Fatal error: Uncaught Error: Call to undefined method WC_Gateway_Amazon_Payments_Advanced_Legacy::
   update_option()
    in XXX/public_html/wp-content/plugins/woocommerce-gateway-amazon-
   payments-advanced/includes/class-wc-amazon-payments-advanced-api.php on line 
   89
 * Call stack:
 * WC_Amazon_Payments_Advanced_API::validate_api_keys()
    wp-content/plugins/woocommerce-
   gateway-amazon-payments-advanced/includes/class-wc-gateway-amazon-payments-advanced-
   abstract.php:806 WC_Gateway_Amazon_Payments_Advanced_Abstract::validate_api_keys()
   wp-includes/class-wp-hook.php:286 WP_Hook::apply_filters() wp-includes/class-
   wp-hook.php:310 WP_Hook::do_action() wp-includes/plugin.php:465 do_action() wp-
   content/plugins/woocommerce/includes/admin/settings/class-wc-settings-checkout.
   php:372 WC_Settings_Payment_Gateways::save() wp-includes/class-wp-hook.php:286
   WP_Hook::apply_filters() wp-includes/class-wp-hook.php:310 WP_Hook::do_action()
   wp-includes/plugin.php:465 do_action() wp-content/plugins/woocommerce/includes/
   admin/class-wc-admin-settings.php:77 WC_Admin_Settings::save() wp-content/plugins/
   woocommerce/includes/admin/class-wc-admin-menus.php:105 WC_Admin_Menus::settings_page_init()
   wp-includes/class-wp-hook.php:286 WP_Hook::apply_filters() wp-includes/class-
   wp-hook.php:310 WP_Hook::do_action() wp-includes/plugin.php:465 do_action() wp-
   admin/admin.php:211

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

 *  Plugin Support [Sol J. a11n](https://wordpress.org/support/users/solstudioim/)
 * (@solstudioim)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14492674)
 * Hi there [@lmn40227](https://wordpress.org/support/users/lmn40227/)
 * It appears to be that your WooCommerce Amazon Pay files are broken.
 * Could you please download the latest version and then upload the files to your
   WP-content/plugin-name-folder?
 * Then try to reload or try again to save.
 * Let me know how it goes!
 *  Thread Starter [lmn40227](https://wordpress.org/support/users/lmn40227/)
 * (@lmn40227)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14494822)
 * Hi Sol,
 * I download the latest version, upload and install.
 * same issue still occur.
 * thanks
    cory
 *  Thread Starter [lmn40227](https://wordpress.org/support/users/lmn40227/)
 * (@lmn40227)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14494825)
 * and it’s the same error.
 *  Plugin Support [Christian](https://wordpress.org/support/users/christian1983/)
 * (@christian1983)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14495952)
 * Hey [@lmn40227](https://wordpress.org/support/users/lmn40227/)
 * Hope you are doing well!
 * try to check the following link [conflict test](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
   on a Staging site, could be some plugin or even the Theme you are using. We need
   to isolate the problem first.
 * If you can’t find the issue, please contact us at WooCommerce.com > My Account
   > Support. You may need to create an account before you can access that page.
   
   Please include a link to this forum thread, so that we can keep track of what’s
   already been done. We will be able to help you further there.
 * Best,
    Christian
    -  This reply was modified 4 years, 11 months ago by [Christian](https://wordpress.org/support/users/christian1983/).
 *  Thread Starter [lmn40227](https://wordpress.org/support/users/lmn40227/)
 * (@lmn40227)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14509127)
 * Hi Christian,
 * I Disabled all plugins and using the default theme, still showing the same issue.
 * Thanks
    Cory
 *  Plugin Support [Sol J. a11n](https://wordpress.org/support/users/solstudioim/)
 * (@solstudioim)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14512198)
 * Hi Cory [@lmn40227](https://wordpress.org/support/users/lmn40227/)
 * That’s really odd 🙁
 * Could you please send me a copy of your site’s System Status? You can find it
   via W**ooCommerce > Status**. Select “Get system report” and then “Copy for support”.
   Once you’ve done that, you can paste it here?
 * For privacy reasons, feel free to paste the text on [https://gist.github.com/](https://gist.github.com/)
   and then copy the URL here.
 * I hope that helps!
 *  Plugin Support [Christian](https://wordpress.org/support/users/christian1983/)
 * (@christian1983)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14513185)
 * Hey [@lmn40227](https://wordpress.org/support/users/lmn40227/)
 * You can also contact us at WooCommerce.com > My Account > Support. You may need
   to create an account before you can access that page.
    Please include a link 
   to this forum thread, so that we can keep track of what’s already been done. 
   We will be able to help you further there.
 * Best,
    Christian`
 *  Plugin Support [Christian](https://wordpress.org/support/users/christian1983/)
 * (@christian1983)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14538500)
 * Hey there,
 * Since we haven’t heard back from the OP in a while, I’m going to mark this as
   resolved – if you have any further questions, you can start a new thread.
 * Best,
    Christian
 *  Thread Starter [lmn40227](https://wordpress.org/support/users/lmn40227/)
 * (@lmn40227)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14558841)
 * the problem is wc_apa()->get_gateway()->update_option() function unable to use.
 * since this function is only update amazon_keys_setup_and_validated information.
 * I hide line 84 and 89
 * wc_apa()->get_gateway()->update_option( ‘amazon_keys_setup_and_validated’, 1 );
 * wc_apa()->get_gateway()->update_option( ‘amazon_keys_setup_and_validated’, 0 );
 * after that, I’m able to update the amazon setting.
 *  Plugin Support [Sol J. a11n](https://wordpress.org/support/users/solstudioim/)
 * (@solstudioim)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14564904)
 * That’s a very great workaround [@lmn40227](https://wordpress.org/support/users/lmn40227/)
 * I am happy that now the update works for you!

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

The topic ‘Fatal error cause when input the API setting’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-gateway-amazon-payments-advanced/assets/icon-
   256x256.png?rev=3193173)
 * [Amazon Pay for WooCommerce](https://wordpress.org/plugins/woocommerce-gateway-amazon-payments-advanced/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-amazon-payments-advanced/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-amazon-payments-advanced/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-amazon-payments-advanced/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-amazon-payments-advanced/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Sol J. a11n](https://wordpress.org/support/users/solstudioim/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-cause-when-input-the-api-setting/#post-14564904)
 * Status: resolved