2020-08-31 11:12:46 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The interface for the smart button asset renderer.
|
|
|
|
*
|
2020-09-11 14:11:10 +03:00
|
|
|
* @package WooCommerce\PayPalCommerce\Button\Assets
|
2020-08-31 11:12:46 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-09-11 14:11:10 +03:00
|
|
|
namespace WooCommerce\PayPalCommerce\Button\Assets;
|
2020-08-31 11:12:46 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface SmartButtonInterface
|
|
|
|
*/
|
|
|
|
interface SmartButtonInterface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Renders the necessary HTML.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function render_wrapper(): bool;
|
|
|
|
|
2023-02-15 16:03:49 +02:00
|
|
|
/**
|
2023-03-29 20:12:39 +03:00
|
|
|
* Whether any of our scripts (for DCC or product, mini-cart, non-block cart/checkout) should be loaded.
|
2023-02-15 16:03:49 +02:00
|
|
|
*/
|
2023-03-29 20:12:39 +03:00
|
|
|
public function should_load_ppcp_script(): bool;
|
2023-02-15 16:03:49 +02:00
|
|
|
|
2020-08-31 11:12:46 +03:00
|
|
|
/**
|
2023-03-29 20:12:39 +03:00
|
|
|
* Enqueues our scripts/styles (for DCC and product, mini-cart and non-block cart/checkout)
|
2020-08-31 11:12:46 +03:00
|
|
|
*/
|
2023-02-15 16:03:49 +02:00
|
|
|
public function enqueue(): void;
|
2020-08-31 11:12:46 +03:00
|
|
|
|
2023-02-15 16:03:49 +02:00
|
|
|
/**
|
|
|
|
* The configuration for the smart buttons.
|
2020-08-31 11:12:46 +03:00
|
|
|
*
|
2023-02-15 16:03:49 +02:00
|
|
|
* @return array
|
2020-08-31 11:12:46 +03:00
|
|
|
*/
|
2023-02-15 16:03:49 +02:00
|
|
|
public function script_data(): array;
|
2020-08-31 11:12:46 +03:00
|
|
|
}
|