Thank you for the response.
We reached out to the Theme provider (Envato) to get their testing and feedback. Their answer was as follows:
“The theme is basically a skin and it doesn’t change the processes in checkout and it doesn’t perform any validations for coupons or payment options. That’s from the WooCommerce code or 3rd party plugins. Nothing in the error logs indicate a problem with the theme.”
We disabled all plugins with the exception of woocommerce, woopayment and woocommerce multilingual as otherwise the site would not work for testing real redemption of a gift card coupon. We are still experiencing a fatal error with the following log entry:
2025-01-03T20:22:34+00:00Kritisch Uncaught Error: Call to a member function get_tentative_usages_for_user() on null in /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Utilities/OrderController.php:521 Zus?tzlicher Kontext{ “error”: { “type”: 1, “file”: “/home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Utilities/OrderController.php”, “line”: 521 }, “remote-logging”: true, “backtrace”: [ “”, “#0 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Utilities/OrderController.php(451): Automattic\WooCommerce\StoreApi\Utilities\OrderController->get_usage_per_aliases(Object(WC_Coupon), Array)”, “#1 [internal function]: Automattic\WooCommerce\StoreApi\Utilities\OrderController->validate_coupon_usage_limit(Object(WC_Coupon), Object(Automattic\WooCommerce\Admin\Overrides\Order))”, “#2 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Utilities/OrderController.php(203): call_user_func_array(Array, Array)”, “#3 [internal function]: Automattic\WooCommerce\StoreApi\Utilities\OrderController->Automattic\WooCommerce\StoreApi\Utilities\{closure}(‘validate_coupon…’, 1, Array)”, “#4 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Utilities/OrderController.php(205): array_walk(Array, Object(Closure), Array)”, “#5 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Utilities/OrderController.php(170): Automattic\WooCommerce\StoreApi\Utilities\OrderController->validate_coupons(Object(Automattic\WooCommerce\Admin\Overrides\Order))”, “#6 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Routes/V1/Checkout.php(284): Automattic\WooCommerce\StoreApi\Utilities\OrderController->validate_order_before_payment(Object(Automattic\WooCommerce\Admin\Overrides\Order))”, “#7 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Routes/V1/AbstractRoute.php(119): Automattic\WooCommerce\StoreApi\Routes\V1\Checkout->get_route_post_response(Object(WP_REST_Request))”, “#8 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-content/plugins/woocommerce/src/StoreApi/Routes/V1/Checkout.php(136): Automattic\WooCommerce\StoreApi\Routes\V1\AbstractRoute->get_response_by_request_method(Object(WP_REST_Request))”, “#9 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1292): Automattic\WooCommerce\StoreApi\Routes\V1\Checkout->get_response(Object(WP_REST_Request))”, “#10 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/wc/store/v1/ch…’, Array, NULL)”, “#11 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch(Object(WP_REST_Request))”, “#12 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/rest-api.php(449): WP_REST_Server->serve_request(‘/wc/store/v1/ch…’)”, “#13 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/class-wp-hook.php(324): rest_api_loaded(Object(WP))”, “#14 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)”, “#15 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/plugin.php(565): WP_Hook->do_action(Array)”, “#16 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/class-wp.php(418): do_action_ref_array(‘parse_request’, Array)”, “#17 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/class-wp.php(813): WP->parse_request(”)”, “#18 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-includes/functions.php(1336): WP->main(”)”, “#19 /home/httpd/vhosts/xxxxxx.ch/httpdocs/wp-blog-header.php(16): wp()”, “#20 /home/httpd/vhosts/xxxxxx.ch/httpdocs/index.php(17): require(‘/home/httpd/vho…’)”, “#21 {main}”, “thrown” ] }
On top, we are also unable to process a checkout where the cart balance is “0” after applying a gift card coupon. For some reason, the GIFT4U coupons are creating an fatal error in the payment process … and yet the system recognises GIFT4U coupons all the way in the checkout process … until “pay now” ist clicked -> fatal error.
Many thanks for looking again into this issue.