Title: Plugin causing issue on admin-ajax.php
Last modified: April 4, 2021

---

# Plugin causing issue on admin-ajax.php

 *  Resolved [Markldxb](https://wordpress.org/support/users/maraphones/)
 * (@maraphones)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/)
 * Hi,
 * I’m facing a 500 Server error involving admin-ajax.php — [https://tppr.me/uz4LN](https://tppr.me/uz4LN)
   Basically I get this error on Chrome console when I change the quantity on the
   checkout page.
 * Any advise to resolve this?

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

 *  Thread Starter [Markldxb](https://wordpress.org/support/users/maraphones/)
 * (@maraphones)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/#post-14275323)
 * To further describe the issue, I have attached here the exact server error log:
   [https://tppr.me/CCnth](https://tppr.me/CCnth)
 *  [Plamen Petrov](https://wordpress.org/support/users/wallreturn/)
 * (@wallreturn)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/#post-14281843)
 * Have error 500 if in cart have more products if have one is okay.
    Fix IT with
   this!
 *     ```
       <script type="text/javascript">
   
   
                           $("form.checkout").on("change", "input.qty", function () {
   
                               $.ajax({
                                   url: '\/wp-admin\/admin-ajax.php',
                                   data: {
                                       action: 'cqoc_update_order_review',
                                       security: wc_checkout_params.update_order_review_nonce,
                                       post_data: $('form.checkout').serialize()
                                   },
                                   type: 'post',
                                   success: function (response) {
                                       console.log(response);
                                       $('body').trigger('update_checkout');
                                   }
                               });
   
                           });
                       </script>
       ```
   
 *     ```
       function cqoc_update_order_review() {
   
                   $values = array();
                   parse_str($_POST['post_data'], $values);
                   $cart = $values['cart'];
                   print_r($cart);
                   $cart_updated = false;
                   foreach ($cart as $cart_item_key => $cart_value) {
                       $passed_validation = apply_filters('woocommerce_update_cart_validation', true, $cart_item_key, $values, $quantity);
                       if ($passed_validation) {
                           WC()->cart->set_quantity($cart_item_key, $cart_value['qty'], false);
                           $cart_updated = true;
                       }
   
                       //  woocommerce_cart_totals();
                   }
                   // Trigger action - let 3rd parties update the cart if they need to and update the $cart_updated variable.
                   $cart_updated = apply_filters('woocommerce_update_cart_action_cart_updated', $cart_updated);
   
                   if ($cart_updated) {
                       WC()->cart->calculate_totals();
                   }
                   exit;
               }
       ```
   
 *  Plugin Author [bhavik.kiri](https://wordpress.org/support/users/bhavikkiri/)
 * (@bhavikkiri)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/#post-14282073)
 * I’m glad to know that you are able to fix the issue & sharing the solution.
 * I have many users who have multiple products in the cart and it works without
   any issues.
 * I have also checked with multiple products in the cart and it works.
 *  [Plamen Petrov](https://wordpress.org/support/users/wallreturn/)
 * (@wallreturn)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/#post-14283938)
 * Of course , may be i have many Plugins or many change in function,just this is
   my solution for my problem.
    Best regards!
 *  Plugin Author [bhavik.kiri](https://wordpress.org/support/users/bhavikkiri/)
 * (@bhavikkiri)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/#post-14330044)
 * The issue is solved hence marking it as resolved.

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

The topic ‘Plugin causing issue on admin-ajax.php’ is closed to new replies.

 * ![](https://ps.w.org/change-quantity-on-checkout-for-woocommerce/assets/icon-
   256x256.png?rev=3139823)
 * [Change Quantity on Checkout for WooCommerce](https://wordpress.org/plugins/change-quantity-on-checkout-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/change-quantity-on-checkout-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/change-quantity-on-checkout-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/change-quantity-on-checkout-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/change-quantity-on-checkout-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/change-quantity-on-checkout-for-woocommerce/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [bhavik.kiri](https://wordpress.org/support/users/bhavikkiri/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/plugin-causing-issue-on-admin-ajax-php/#post-14330044)
 * Status: resolved