mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
downgrade dhii/module-interface to 0.1
This commit is contained in:
parent
c09e314baa
commit
ddd4f5ba09
11 changed files with 102 additions and 21 deletions
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"dhii/module-interface": "0.2.x-dev",
|
"dhii/module-interface": "0.1",
|
||||||
"psr/container": "^1.0",
|
"psr/container": "^1.0",
|
||||||
"oomphinc/composer-installers-extender": "^1.1",
|
"oomphinc/composer-installers-extender": "^1.1",
|
||||||
"container-interop/service-provider": "^0.4.0",
|
"container-interop/service-provider": "^0.4.0",
|
||||||
|
|
|
@ -36,7 +36,7 @@ class AdminNotices implements ModuleInterface {
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
add_action(
|
add_action(
|
||||||
'admin_notices',
|
'admin_notices',
|
||||||
function() use ( $container ) {
|
function() use ( $container ) {
|
||||||
|
@ -45,4 +45,12 @@ class AdminNotices implements ModuleInterface {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,14 @@ class ApiModule implements ModuleInterface {
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,9 +41,9 @@ class ButtonModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Runs the module.
|
* Runs the module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The Container.
|
* @param ContainerInterface|null $container The Container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
|
|
||||||
add_action(
|
add_action(
|
||||||
'wp',
|
'wp',
|
||||||
|
@ -151,4 +151,12 @@ class ButtonModule implements ModuleInterface {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,9 +38,9 @@ class OnboardingModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Runs the module.
|
* Runs the module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface|null $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
|
|
||||||
$asset_loader = $container->get( 'onboarding.assets' );
|
$asset_loader = $container->get( 'onboarding.assets' );
|
||||||
/**
|
/**
|
||||||
|
@ -100,4 +100,12 @@ class OnboardingModule implements ModuleInterface {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,9 @@ class SessionModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Run the module.
|
* Run the module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface|null $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
add_action(
|
add_action(
|
||||||
'woocommerce_init',
|
'woocommerce_init',
|
||||||
function () use ( $container ) {
|
function () use ( $container ) {
|
||||||
|
@ -51,4 +51,12 @@ class SessionModule implements ModuleInterface {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,9 @@ class SubscriptionModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Runs the module.
|
* Runs the module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface|null $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
add_action(
|
add_action(
|
||||||
'woocommerce_scheduled_subscription_payment_' . PayPalGateway::ID,
|
'woocommerce_scheduled_subscription_payment_' . PayPalGateway::ID,
|
||||||
static function ( $amount, $order ) use ( $container ) {
|
static function ( $amount, $order ) use ( $container ) {
|
||||||
|
@ -51,4 +51,12 @@ class SubscriptionModule implements ModuleInterface {
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,9 +49,9 @@ class WcGatewayModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Runs the module.
|
* Runs the module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface|null $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
$this->register_payment_gateways( $container );
|
$this->register_payment_gateways( $container );
|
||||||
$this->register_order_functionality( $container );
|
$this->register_order_functionality( $container );
|
||||||
$this->register_columns( $container );
|
$this->register_columns( $container );
|
||||||
|
@ -164,9 +164,9 @@ class WcGatewayModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Registers the payment gateways.
|
* Registers the payment gateways.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface|null $container The container.
|
||||||
*/
|
*/
|
||||||
private function register_payment_gateways( ContainerInterface $container ) {
|
private function register_payment_gateways( ContainerInterface $container = null ) {
|
||||||
|
|
||||||
add_filter(
|
add_filter(
|
||||||
'woocommerce_payment_gateways',
|
'woocommerce_payment_gateways',
|
||||||
|
@ -356,4 +356,13 @@ class WcGatewayModule implements ModuleInterface {
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,9 @@ class WebhookModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Run the Webhook module.
|
* Run the Webhook module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The Container.
|
* @param ContainerInterface|null $container The Container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
add_action(
|
add_action(
|
||||||
'rest_api_init',
|
'rest_api_init',
|
||||||
static function () use ( $container ) {
|
static function () use ( $container ) {
|
||||||
|
@ -76,4 +76,12 @@ class WebhookModule implements ModuleInterface {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,15 @@ class WooCommerceLoggingModule implements ModuleInterface {
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The container.
|
* @param ContainerInterface $container The container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,16 @@ class PluginModule implements ModuleInterface {
|
||||||
/**
|
/**
|
||||||
* Runs the module.
|
* Runs the module.
|
||||||
*
|
*
|
||||||
* @param ContainerInterface $container The Container.
|
* @param ContainerInterface|null $container The Container.
|
||||||
*/
|
*/
|
||||||
public function run( ContainerInterface $container ) {
|
public function run( ContainerInterface $container = null ) {
|
||||||
// TODO: Implement run() method.
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the key for the module.
|
||||||
|
*
|
||||||
|
* @return string|void
|
||||||
|
*/
|
||||||
|
public function getKey() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue