diff --git a/views/page-mandate.php b/views/page-mandate.php index 6c5c647..c5da2b9 100644 --- a/views/page-mandate.php +++ b/views/page-mandate.php @@ -49,14 +49,18 @@ if ( $api_key ) { $client = new Client( $api_key ); - /** - * Mandate. - * - * @link https://docs.mollie.com/reference/v2/mandates-api/get-mandate - */ - $response = $client->get_mandate( $mollie_mandate_id, $mollie_customer_id ); - - $mollie_mandate = $response; + try { + /** + * Mandate. + * + * @link https://docs.mollie.com/reference/v2/mandates-api/get-mandate + */ + $response = $client->get_mandate( $mollie_mandate_id, $mollie_customer_id ); + + $mollie_mandate = $response; + } catch ( \Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch + // No problem, in case of an error we will not show the remote information. + } } ?>