Created
December 1, 2022 20:51
-
-
Save KristaButler/744b4761dd42d234aa889be19c77dda5 to your computer and use it in GitHub Desktop.
Allow no ecommerce integration in EA Options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('esaf_validate_options', function($errors) { | |
$return_errors = []; | |
$ecommerce_message = __('You must enable at least one eCommerce Payment Integration.', 'easy-affiliate'); | |
foreach($errors as $error_msg) { | |
if ($error_msg != $ecommerce_message) { | |
$return_errors[] = $error_msg; | |
} | |
} | |
return $return_errors; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment