HEX
Server: nginx/1.18.0
System: Linux oas2 6.8.0-1039-oracle #40~22.04.1-Ubuntu SMP Wed Oct 29 05:11:00 UTC 2025 aarch64
User: root (0)
PHP: 8.1.2-1ubuntu2.23
Disabled: NONE
Upload Files
File: /var/www/ecom/wp-content/plugins/payoneer-checkout/inc/error.php
<?php

declare (strict_types=1);
namespace Syde\Vendor;

use Syde\Vendor\Dhii\Validation\Exception\ValidationFailedExceptionInterface;
return (static function () {
    $formatValidationError = static function ($error) {
        if ($error instanceof \Throwable) {
            return $error->getMessage();
        }
        return (string) $error;
    };
    return static function (\Throwable $exception) use ($formatValidationError) {
        $message = $exception->getMessage();
        if ($exception instanceof ValidationFailedExceptionInterface) {
            $errors = [];
            foreach ($exception->getValidationErrors() as $validationError) {
                $errors[] = $formatValidationError($validationError);
            }
            $message .= '</br>' . \implode('</br>', $errors);
        }
        \add_action('all_admin_notices', static function () use ($message) {
            $class = 'notice notice-error';
            \printf(
                '<div class="%1$s"><h4>%2$s</h4><p>%3$s</p></div>',
                \esc_attr($class),
                /* translators: The entire plugin failed to bootstrap. This message is only visible to admins and will be accompanied by a list of errors */
                \esc_html__('Payoneer Checkout failed to initialize', 'payoneer-checkout'),
                \wp_kses_post($message)
            );
        });
    };
})();