Skip to content

Instantly share code, notes, and snippets.

@KristaButler
Created December 1, 2022 20:51
Show Gist options
  • Save KristaButler/744b4761dd42d234aa889be19c77dda5 to your computer and use it in GitHub Desktop.
Save KristaButler/744b4761dd42d234aa889be19c77dda5 to your computer and use it in GitHub Desktop.
Allow no ecommerce integration in EA Options
<?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