Support » Plugin: Woo Floating Minicart » Error in error_log: “add_to_cart_fragments”

  • Resolved dnadog

    (@dnafritts)


    Your plugin is repeatedly generating the error below. The line in the code that is incorrect is line #40 in awfm-frontend.php You might want to update it as suggested to help people not get errors constantly in their logs.

    The The “add_to_cart_fragments” hook uses out of date data structures and function is deprecated since version 3.1.1. Replace with woocommerce_add_to_cart_fragments.

Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author Shiva Shanker Bhatta

    (@shivashankerbhatta)

    No worries, juts go to your /wp-admin dashboard, navigate to Plugins from the admin sidebar menu, check version of each of the installed plugins.

    Thanks for the reply.

    I’ve checked we have WooCommerce 3.1.2 but no ‘Woo Floating Minicart 3.1.1’

    Is this a separate plugin that we need for woocommerce to work? (we ideally only want the essential plugins as our site already really heavy)

    Sh Shanker can you please tell where to make changes so that the issue can be resolved. Thank you

    • This reply was modified 2 years, 5 months ago by komalnaqvi.
    Plugin Author Shiva Shanker Bhatta

    (@shivashankerbhatta)

    If you are using “WooCommerce 3.1.1” and above along with “Woo Floating Minicart 3.1.1”, login your file server, go to “/wp-content/plugins/woo-floating-minicart/includes/awfm-functions.php”, then replace all of the codes under “awfm_woocommerce_fragments_compatibilty_function” function with
    add_filter('woocommerce_add_to_cart_fragments', array( $awfm, 'woo_floating_minicart_add_to_cart_fragment'));

    OR

    If you are using “WooCommerce 3.1.1” and above along with older version “Woo Floating Minicart”, means less than “3.1.1”, login your file server, go to “/wp-content/plugins/woo-floating-minicart/includes/awfm-frontend.php”, then find add_filter('add_to_cart_fragments', array( $awfm, 'woo_floating_minicart_add_to_cart_fragment')); and replace with add_filter('woocommerce_add_to_cart_fragments', array( $awfm, 'woo_floating_minicart_add_to_cart_fragment'));

    I am using WooCommerce 3.0.8 and Woo Floating Minicart 3.1.1.

    Plugin Author Shiva Shanker Bhatta

    (@shivashankerbhatta)

    Please update to latest version “Woo Floating Minicart 3.1.2.1”. That should solve the issues.

    Updated Woo Floating Minicart to version 3.1.2.1. Still facing the issue

    Plugin Author Shiva Shanker Bhatta

    (@shivashankerbhatta)

    Please follow the instructions.
    1) Go to your plugins admin panel
    2) Search Woo Floating Minicart
    3) Deactivate the plugin
    4) Check your recent error log, Might be after adding some product on cart,

    If the issues is goes away, there’s some problem with version comparison function approach. In that case, you should have to do following update.
    a) Login your file server,
    b) Go to “/wp-content/plugins/woo-floating-minicart/includes/awfm-functions.php”
    c) Then replace all of the codes inside “awfm_woocommerce_fragments_compatibilty_function” function with
    add_filter('woocommerce_add_to_cart_fragments', array( $awfm, 'woo_floating_minicart_add_to_cart_fragment'));
    d) Save and upload the file in same directory.

    Otherwise, the errors are firing by other entities.

    The “add_to_cart_fragments” hook uses out of date data structures and function is deprecated since version 3.1.2. Replace with woocommerce_add_to_cart_fragments.

    this error is show and add to cart is very slow reply please

    php version is 5.6 and woocommerce version 3.1.2
    website name mtrado.com

    Plugin Author Shiva Shanker Bhatta

    (@shivashankerbhatta)

    I could not found “Woo Floating Minicart” as an active plugins.
    Would you please first confirm if the issue is from the mentioned plugin or not?

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Error in error_log: “add_to_cart_fragments”’ is closed to new replies.