mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
PSR-4 is much more robust and predictable. But to do this, a source root dir must be specified for every module. This could be done in the root file, but this is not very modular. Instead, now every module declares its own source root by using the amazing Composer Merge Plugin. This approach allows each module to also declare its own dependencies. Together, these changes allow modules to be easily extractable to separate pacakges when the need arises, and in general improves modularity significantly.
44 lines
697 B
PHP
44 lines
697 B
PHP
<?php
|
|
/**
|
|
* If we can't render our buttons, this Null object will be used.
|
|
*
|
|
* @package WooCommerce\PayPalCommerce\Button\Assets
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace WooCommerce\PayPalCommerce\Button\Assets;
|
|
|
|
/**
|
|
* Class DisabledSmartButton
|
|
*/
|
|
class DisabledSmartButton implements SmartButtonInterface {
|
|
|
|
/**
|
|
* Renders the necessary HTML.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function render_wrapper(): bool {
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Enqueues necessary scripts.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function enqueue(): bool {
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Whether tokens can be stored or not.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function can_save_vault_token(): bool {
|
|
|
|
return false;
|
|
}
|
|
}
|