WC API error due to discounts pro plugin
-
Hi. We use the WC API extensively to integrate with our XMS. Recently updating products via the WC API after the installation of the discount pro plugin stopped working and we got this error.
stderr: #4 /var/www/clients/client1/web5/web/wp-content/plugins/woocommerce/includes/class-wc-data-store in /var/www/clients/client1/web5/web/wp-content/plugins/easy-woocommerce-discounts-pro/includes/class-wccs-product-price-replace.php on line 390
Replacing line 390 with this code seemed to fix the issue.
} elseif ( ! WCCS()->cart->is_empty() && WCCS()->WCCS_Rules_Helpers->has_conditions( $pricing_rules, $cart_conditions ) ) {Original line
} elseif ( ! WC()->cart->is_empty() && WCCS()->WCCS_Rules_Helpers->has_conditions( $pricing_rules, $cart_conditions ) ) {We changed the WC()->cart->is_empty() to WCCS()->cart->is_empty()
The topic ‘WC API error due to discounts pro plugin’ is closed to new replies.