This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this hook to filter the stopforumspam API based URL.
Usage
add_filter( 'frm_stopforumspam_api_url', 'stopforumspam_api_url' , 10, 2 );
Parameters
- $api_url (string): API URL.
- $args (array): Contains values.
Examples
Force to send request to the EU server
add_filter( 'frm_stopforumspam_api_url', function( $api_url, $args ) {
if ( 10 == $args['values']['form_id'] ) {
return 'https://europe.stopforumspam.org/api';
}
return $api_url;
}, 10, 2 );