# hyperpay-gateways/trunk/src/Traits/HyperpayBlocks.php

HyperPay Payments, version trunk. 47 lines.

- Page: https://pluginprobe.com/plugins/hyperpay-gateways/trunk/code/src/Traits/HyperpayBlocks.php
- Raw: https://pluginprobe.com/plugins/hyperpay-gateways/trunk/raw/src/Traits/HyperpayBlocks.php
- Modified: 2025-11-18T13:55:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hyperpay-gateways/trunk/code/src/Traits/HyperpayBlocks.php#L10-L20`.

```php
<?php

namespace Hyperpay\Gateways\Traits;
if ( ! defined( 'ABSPATH' ) ) exit;


trait HyperpayBlocks
{
    public $isExpress = false;
    public $isDynamicCheck = false;
    public $supports = ["products"];
    public $action_button = '';



    public function canMakePayment()
    {
        return  wp_send_json(["canMakePayment" => true]);
    }

    /**
     * Initializes the payment method type.
     */

    public function initialize()
    {
    }

    public function extraScriptData()
    {
        return [];
    }

    /**
     * Check if the store uses blocks on the cart or checkout page.
     *
     * @return boolean
     */
    public static function has_checkout_block()
    {
        $checkout_id   = wc_get_page_id('checkout');
        $has_classic_checkout = $checkout_id && has_block('woocommerce/classic-shortcode', $checkout_id);

        return !$has_classic_checkout;
    }
}

```
