gundernak
Forum Replies Created
-
Forum: Plugins
In reply to: [User Role Editor] users.php error and othersHI,
Thank you for offering the support, but since then I have troubleshooted this issue and it is not related to your plugin.
The plugin works fine!
Bests,
AndrásThe issue is solved. Woocommerce displays NOT REQUIRED billing address fields when only virtual products are in the cart. This way a costumer can purchase without giving an address, and the seller will have difficulties to make an invoice of the purchase.
Here is a code by which you can make the billing address fields REQUIRED all the time:
add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );
// Our hooked in function – $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields[‘billing’][‘billing_address_1’][‘required’] = true;
$fields[‘billing’][‘billing_city’][‘required’] = true;
$fields[‘billing’][‘billing_postcode’][‘required’] = true;
return $fields;I did more tests, and this issue is more complicated. As I see now (and correct me if I’m wrong). The second problem is the following and related to the above mentioned:
When a user purchases a virtual product, Woocommerce does not ask for a required address field, nor at the registration, nor at the purchase!!!
This means WOOCOMMECE LET THE USER TO MAKE A FULL PURCHASE AND PAYMENT WITHOUT GIVING ANY OF THEIR ADDRESS IF THE PRODUCT IS VIRTUAL.
This result in a situation when I, the seller can not make an invoice if the costumer does not fill the unrequired address field, and I have to ask them via email to give me their address. This is nonsense.