endpoints = $endpoints; } /** * Bind the notice renderer. * * @return void */ public function hooks(): void { add_action( 'admin_notices', array( $this, 'render' ) ); } /** * Show failing endpoints to settings managers. * * @return void */ public function render(): void { if ( ! current_user_can( \DrPlugin\WP\ReleaseCart\Core\Capabilities::MANAGE_SETTINGS ) ) { return; } $failing = $this->endpoints->failing(); if ( array() === $failing ) { return; } echo '

'; echo esc_html__( 'ReleaseCart has disabled the following webhook endpoints after repeated delivery failures. Fix the receivers, then re-enable the endpoints to resume deliveries:', 'releasecart' ); echo '

'; echo esc_html__( 'Open the webhook settings', 'releasecart' ); echo '

'; } }