mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Update parameter name
Fixes PHPCS
This commit is contained in:
parent
3a72a73ae3
commit
df185157bd
12 changed files with 77 additions and 77 deletions
|
@ -39,15 +39,15 @@ class ButtonModule implements ModuleInterface {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function run( ContainerInterface $container ): void {
|
||||
public function run( ContainerInterface $c ): void {
|
||||
|
||||
add_action(
|
||||
'wp',
|
||||
static function () use ( $container ) {
|
||||
static function () use ( $c ) {
|
||||
if ( is_admin() ) {
|
||||
return;
|
||||
}
|
||||
$smart_button = $container->get( 'button.smart-button' );
|
||||
$smart_button = $c->get( 'button.smart-button' );
|
||||
/**
|
||||
* The Smart Button.
|
||||
*
|
||||
|
@ -58,9 +58,9 @@ class ButtonModule implements ModuleInterface {
|
|||
);
|
||||
add_action(
|
||||
'wp_enqueue_scripts',
|
||||
static function () use ( $container ) {
|
||||
static function () use ( $c ) {
|
||||
|
||||
$smart_button = $container->get( 'button.smart-button' );
|
||||
$smart_button = $c->get( 'button.smart-button' );
|
||||
/**
|
||||
* The Smart Button.
|
||||
*
|
||||
|
@ -72,8 +72,8 @@ class ButtonModule implements ModuleInterface {
|
|||
|
||||
add_filter(
|
||||
'woocommerce_create_order',
|
||||
static function ( $value ) use ( $container ) {
|
||||
$early_order_handler = $container->get( 'button.helper.early-order-handler' );
|
||||
static function ( $value ) use ( $c ) {
|
||||
$early_order_handler = $c->get( 'button.helper.early-order-handler' );
|
||||
if ( ! is_null( $value ) ) {
|
||||
$value = (int) $value;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class ButtonModule implements ModuleInterface {
|
|||
}
|
||||
);
|
||||
|
||||
$this->register_ajax_endpoints( $container );
|
||||
$this->register_ajax_endpoints( $c );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue