Any suggestions on how to fix?
Much appreciated & TIA.
]]>add_action( 'woocommerce_checkout_process', 'wc_remove_checkout_fields11' );
function wc_remove_checkout_fields11($current_user_id){
$current_user_id = get_current_user_id();
$phone = get_user_meta($current_user_id ,'_billing_phone',true);
$billing1= get_user_meta($current_user_id ,'billing_checkbox',true);
$phone2=$_POST['_billing_phone'];
if ( isset( $_POST['billing_checkbox']) ) {
if($phone==$phone2 && $billing1==1){
remove_action( 'woocommerce_after_checkout_validation', 'place_test_request211',10 );
wc_add_notice( 'we already have a user with the same mobile number and has recieved the gift', 'error' );
}
elseif($phone==$phone2 && $billing1==0){
wc_add_notice('phone equal but not recieved a gift','error');
add_action( 'woocommerce_after_checkout_validation', 'place_test_request211',10,1 );
}
elseif($phone!=$phone2 && $billing1==1){
wc_add_notice('phone not equal but recieved a gift','error');
add_action( 'woocommerce_after_checkout_validation', 'place_test_request211',10,1 );
}
elseif($phone!=$phone2 && $billing1==0){
add_action( 'woocommerce_after_checkout_validation', 'place_test_request211',10,1 );
}
}
}
This is my code where i have added action inside the if clause in order not to stop the action of adding a gift, and remove action to stop the action of adding a gift. but it is not working. any advise and help please
]]>I want to use the plugin cupon-box,
My idea would be to offer a unique code for each user that could be exchanged for a product gift to be automatically added to the cart once you input the code on the checkout
Could you please let me know if this is possible
Thanks
Alberto
]]>As what I now realized there’s NO delete button for regular users on each gift. This can run 10 miles long if keep receiving it. For the admin side does have the delete button. I don’t think the regular users would like anyone to delete their gift EXCEPT themselves.
It’s there’s a way to hook a delete button for each gift was sent so the users have options to delete an individual?
Please advise help,
Thanks