Fatal error after latest update
-
This filter now suddenly breaks the site with this fatal error in PHP… it was working fine before update?
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function displaystockestimatedate(), 1 passed in /…../wp-includes/class-wp-hook.php on line 288 and exactly 2 expected in /…../wp-content/themes/storefront-child/functions.php:128
add_filter('woocommerce_get_stock_html','displaystockestimatedate'); function displaystockestimatedate($existing,$product){ $productid=get_the_ID(); if(is_singular('product')){ if(get_post_meta($productid,'_estimated_backorder_available_date',true) != ""){ $output = $existing."<div class=\"backorderestimateavailability\">".get_post_meta($productid,"_estimated_backorder_available_date",true)."</div>"; }else{ $output = $existing; } return $output; }else{ return $existing; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Fatal error after latest update’ is closed to new replies.