I am trying to pass 2 variables to woocommerce_before_calculate_totals
Uncaught ArgumentCountError: Too few arguments to function add_custom_price(), 1 passed in wp-includes/class-wp-hook.php on line 324 and exactly 2 expected
add_action( 'woocommerce_before_calculate_totals', 'add_custom_price', 1000, 2);
function add_custom_price($var1, $var2) {}
Is it possible?
New contributor
Faevilangel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.