Hi there, @rwps.
Yes, you can. The current version of the plugin doesn’t have the setting to do so. But, we’ve made a custom snippet below for you to make the PO Number required instead of optional.
add_action( 'woocommerce_after_checkout_validation', 'igfw_po_number_required_on_checkout', 10, 2 );
function igfw_po_number_required_on_checkout( $data, $errors ){
if (
$data['payment_method'] === 'igfw_invoice_gateway' &&
get_option('igfw_enable_purchase_order_number') == 'yes' &&
( ! isset( $_POST['igfw_purchase_order_number'] ) || empty( $_POST['igfw_purchase_order_number'] ) )
) {
$errors->add( 'billing_po_number_error', __( 'Please enter a PO Number.', 'invoice-gateway-for-woocommerce' ) );
}
}
add_filter( 'igfw_purchase_order_number_title', 'igfw_po_number_title_on_checkout' );
function igfw_po_number_title_on_checkout( $title ){
return __( 'Purchase Order (required)', 'invoice-gateway-for-woocommerce' );
}
Also, thanks for using our plugin and let me know how it goes.
Cheers!