Skip to content

Commit

Permalink
Merge branch 'main' into 6-no-longer-use-files-from-plugin-directory-…
Browse files Browse the repository at this point in the history
…pronamic-idealimages
  • Loading branch information
remcotolsma committed Jun 7, 2024
2 parents a36eecc + 31e388c commit 88a5e6c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.wp-env.json export-ignore
/Gruntfile.js export-ignore
/phpcs.xml.dist export-ignore
/phpmd.ruleset.xml export-ignore
/phpstan.neon.dist export-ignore
Expand Down
13 changes: 9 additions & 4 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{
"core": null,
"plugins": [
".",
"../../../",
"https://github.com/pronamic/eventespresso/releases/download/4.10.38.p/event-espresso-core-reg-4.10.38.p.zip",
"pronamic/wp-env-quick-login",
"pronamic/wp-pronamic-pay-test-helper",
"https://downloads.wordpress.org/plugin/pronamic-client.zip",
"https://downloads.wordpress.org/plugin/query-monitor.zip",
"https://downloads.wordpress.org/plugin/one-time-login.zip"
"https://downloads.wordpress.org/plugin/one-time-login.zip",
"https://downloads.wordpress.org/plugin/wp-plugin-dependencies.zip",
"https://github.com/pronamic/eventespresso/releases/download/4.10.38.p/event-espresso-core-reg-4.10.38.p.zip"
],
"mappings": {
"wp-content/plugins/pronamic-pay-event-espresso": "."
},
"config": {
"PRONAMIC_PAY_DEBUG": true
}
Expand Down
28 changes: 27 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,42 @@
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"roots/wordpress-core-installer": true,
"automattic/jetpack-autoloader": true,
"phpstan/extension-installer": true
},
"platform": {
"php": "8.1"
},
"platform-check": false,
"sort-packages": true,
"wp-slug": "pronamic-pay-event-espresso"
},
"extra": {
"installer-paths": {
"packages/{$vendor}/{$name}": [
"pronamic/wp-datetime",
"pronamic/wp-gravityforms-nl",
"pronamic/wp-html",
"pronamic/wp-http",
"pronamic/wp-mollie",
"pronamic/wp-money",
"pronamic/wp-number",
"vendor:wp-pay",
"vendor:wp-pay-extensions",
"vendor:wp-pay-gateways",
"woocommerce/action-scheduler"
]
}
},
"require": {
"php": ">=8.0",
"automattic/jetpack-autoloader": "^3.0",
"composer/installers": "^2.2",
"woocommerce/action-scheduler": "^3.8",
"wp-pay/core": "^4.16"
},
"require-dev": {
Expand All @@ -63,6 +88,7 @@
"roots/wordpress": "^6.4",
"szepeviktor/phpstan-wordpress": "^1.3",
"vimeo/psalm": "^0.3.14",
"wp-pay-gateways/mollie": "^4.11",
"wp-phpunit/wp-phpunit": "^6.4",
"yoast/phpunit-polyfills": "^2.0"
},
Expand Down
33 changes: 30 additions & 3 deletions pronamic-pay-event-espresso.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*
* License: GPL-3.0-or-later
*
* Requires Plugins: pronamic-ideal
* Depends: wp-pay/core
*
* GitHub URI: https://github.com/pronamic/wp-pronamic-pay-event-espresso
*
* @author Pronamic <[email protected]>
Expand All @@ -27,6 +24,25 @@
* @package Pronamic\WordPress\Pay\Extensions\EventEspresso
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Autoload.
*/
require_once __DIR__ . '/vendor/autoload_packages.php';

/**
* Bootstrap.
*/
\Pronamic\WordPress\Pay\Plugin::instance(
[
'file' => __FILE__,
'action_scheduler' => __DIR__ . '/packages/woocommerce/action-scheduler/action-scheduler.php',
]
);

add_filter(
'pronamic_pay_plugin_integrations',
function ( $integrations ) {
Expand All @@ -41,3 +57,14 @@ function ( $integrations ) {
return $integrations;
}
);

if ( class_exists( \Pronamic\WordPress\Pay\Gateways\Mollie\Integration::class ) ) {
add_filter(
'pronamic_pay_gateways',
function ( $gateways ) {
$gateways[] = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration();

return $gateways;
}
);
}

0 comments on commit 88a5e6c

Please sign in to comment.