• cherrycoding

    (@cherrycoding)


    Hi,

    I am having the following problem I am trying to reduce the sale price from the original price as bulk action in the product e.g. regular price is 45€ and I set sale price 30% then the ajax loads and gets an 500 error.

    In the logs I have found this:

    [29-Jun-2024 05:57:39 UTC] PHP Fatal error:  Uncaught TypeError: Unsupported operand types: string / int in /usr/www/users/monsta/website/wp-content/plugins/woocommerce/includes/class-wc-ajax.php:2808
    Stack trace:
    #0 /usr/www/users/monsta/website/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(2788): WC_AJAX::variation_bulk_adjust_price()
    #1 /usr/www/users/monsta/website/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(2902): WC_AJAX::variation_bulk_action_variable_sale_price_decrease()
    #2 /usr/www/users/monsta/website/wp-includes/class-wp-hook.php(324): WC_AJAX::bulk_edit_variations()
    #3 /usr/www/users/monsta/website/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #4 /usr/www/users/monsta/website/wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 /usr/www/users/monsta/website/wp-admin/admin-ajax.php(192): do_action()
    #6 {main}

    I have checked the values but its a normal int 45 and if I set the sale price (not reduce to set the final price to 31,50) e.g. it works for the variations.

    Does anybody have an idea?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Stef

    (@serafinnyc)

    Hello @cherrycoding how many are you trying to edit at the same time?

    Thread Starter cherrycoding

    (@cherrycoding)

    Hi,

    only one product with 4 variations. With bulk edit I mean the bulk action dropdown at the variations.

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello cherrycoding

    Thank you for contacting Woo support.

    I was able to reproduce the 500 Error by using the “Decrease sale price (fixed amount or percentage)” option from the Bulk actions dropdown.

    Then I noticed that my variations were missing the Sale Price, so there was no value to decrease from. Then I added the Sale Price for all variations and tried the same step.
    This time the sale prices were updated and the 500 error did not show.

    Could you check if you have the correct sale price for all variations?

    Looking forward to your response. ??

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘can’t bulk edit the sale price’ is closed to new replies.