• My plugin has an add to cart button, which triggers the following function.

      if($woocommerce->cart->add_to_cart( $final_product_id, $_REQUEST['wtd_design_data']['qty'], $final_custom_variations_id, $arr, null ) )
      {
        echo 'cart_updated';
        if(!isset($_SESSION['wtd_cart_id']))
        {
          $_SESSION['wtd_cart_id'] = $uIds;
        }
      }

    After 3.0 update, this is returning false. WP_DEBUG did show any errors, I couldn’t find a way to debug this. I turned back to old version of woocommerce. One thing I found in an error_log file is the following message:

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

    I don’t know if this is related but I searched for “add_to_cart_fragments” and can’t find any information.

    If you don’t know what can be the cause of this, if you know a way to debug, please let me know.

    • This topic was modified 7 years, 8 months ago by ozanyilmaz2017. Reason: edited title for better understanding
Viewing 2 replies - 1 through 2 (of 2 total)
  • try this go to woocommerce system status click tools find the Install WooCommerce pages click save changes …

    Getting same error. Tried Install woocommerce pages and then click on save. Get another error when click on save.

    ERROR: options page not found.

    And still getting error : “The The “add_to_cart_fragments” hook uses out of date data structures and function is is deprecated since version 3.0.8. Replace with woocommerce_add_to_cart_fragments.”

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[3.0] Error: add_to_cart not working’ is closed to new replies.