We need to check in the function below if the user role is customer.
The function below changes text of place order button if the order total is 0, we need it to check if the user role is customer too and the total is 0.
The code we use so far
function mishaa_custom_button_text($button_text) {
global $woocommerce;
$total = $woocommerce->cart->total;
if ($total == 0 ) {
$button_text = "Submit Registration";
}
return $button_text;
}
add_filter( 'woocommerce_order_button_text', 'mishaa_custom_button_text' );