I want to delete the woocommerce_checkout_process action hook, if the particular project in cart.
add_action('woocommerce_checkout_process', 'my_custom_checkout_field_process');
function my_custom_checkout_field_process() {
// Check if set, if its not set add an error.
if ( ! $_POST['developer_name'] )
wc_add_notice( __( 'Please fill in your name.' ), 'error' );
}
I need to remove this action hook my_custom_checkout_field_process only if the customer added the product_id (19)
to the cart. Else there's no need to remove the add_action.