Point your clients at your own help page when an add-on install is refused
The message under a Ready to install card’s Install button comes from the Benecaster Add-on Manager. Replace or extend it, for one refusal or all, without changing what happened.
Return plain text; it is shown escaped. Return anything but a non-empty string and the Manager’s own message is kept. The refusal, its code and its status never change. The codes are advisory, and Benecaster never branches on them.
Code
<?php
add_filter( 'benecaster_manager_install_error_message', function ( string $message, string $code, string $slug ): string {
if ( 'benecaster_manager_not_entitled' !== $code ) {
return $message;
}
return $message . ' ' . __( 'Ask your agency to add it to your plan: help.example.com/addons', 'my-agency' );
}, 10, 3 );
Hooks Used
Need this built rather than just documented? See our services →