wp-pay / core
Core components for the WordPress payment processing library.
Installs: 109 988
Dependents: 89
Suggesters: 0
Security: 0
Stars: 27
Watchers: 5
Forks: 3
Type:wordpress-plugin
Requires
- php: >=7.4
- ext-dom: *
- ext-libxml: *
- ext-simplexml: *
- automattic/jetpack-autoloader: ^3.0
- pronamic/wp-datetime: ^2.1
- pronamic/wp-html: ^2.2
- pronamic/wp-http: ^1.2
- pronamic/wp-money: ^2.3
- pronamic/wp-number: ^1.3
- pronamic/wp-pay-logos: ^2.2
- viison/address-splitter: ^0.3.4
- woocommerce/action-scheduler: ^3.8
Requires (Dev)
- overtrue/phplint: ^9.4
- php-coveralls/php-coveralls: ^2.4
- php-stubs/wordpress-globals: ^0.2.0
- php-stubs/wp-cli-stubs: ^2.4
- phpmd/phpmd: ^2.9
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.11
- pronamic/pronamic-cli: ^1.1
- pronamic/wp-coding-standards: ^2.0
- pronamic/wp-documentor: ^1.4
- roots/wordpress: ^6.0
- szepeviktor/phpstan-wordpress: ^1.3
- vimeo/psalm: ^5.24
- wordpress/sqlite-database-integration: ^2.1
- wp-cli/wp-cli: ^2.3
- wp-phpunit/wp-phpunit: ^6.1
- yoast/phpunit-polyfills: ^2.0
- dev-main
- v4.24.0
- v4.23.0
- v4.22.1
- v4.22.0
- v4.21.1
- v4.21.0
- v4.20.0
- v4.19.0
- v4.18.0
- v4.17.0
- v4.16.0
- v4.15.1
- v4.15.0
- v4.14.3
- v4.14.2
- v4.14.1
- v4.14.0
- v4.13.2
- v4.13.1
- v4.13.0
- v4.12.0
- v4.11.0
- v4.10.1
- v4.10.0
- v4.9.4
- v4.9.3
- v4.9.2
- v4.9.1
- v4.9.0
- v4.8.0
- v4.7.3
- v4.7.2
- v4.7.1
- v4.7.0
- v4.6.0
- 4.5.0
- 4.4.1
- 4.4.0
- 4.3.1
- 4.3.0
- 4.2.1
- 4.2.0
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.2
- 4.0.1
- 4.0.0
- 4.0.0-alpha.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.1
- 3.0.0
- 2.7.2
- 2.7.1
- 2.7.0
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.7
- 2.2.6
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.3.14
- 1.3.13
- 1.3.12
- 1.3.11
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- dev-201-notice-function-_load_textdomain_just_in_time-was-called-incorrectly
- dev-199-show-license-admin-notice-only-on-dashboard-and-pronamic-pay-pages
- dev-184-only-products-in-payment_lines_name-merge-tag
- dev-feature/payment-links
- dev-feature/import
This package is auto-updated.
Last update: 2024-12-17 13:02:15 UTC
README
WordPress Pay » Core
The WordPress payment processing library is intended to make payments and integrations with payment providers easier to set up and maintain within WordPress. It has similarities to libraries like https://github.com/Payum/Payum and https://github.com/thephpleague/omnipay, but is more focused on WordPress. The code complies with the WordPress Coding Standards and the WordPress APIs are used.
Table of contents
Status
CLI
Check pending payment status
wp pay payment status $( wp post list --field=ID --post_type=pronamic_payment --post_status=payment_pending --order=ASC --orderby=date --posts_per_page=100 --paged=1 )
WordPress Filters
pronamic_payment_gateway_configuration_id
\add_filter( 'pronamic_payment_gateway_configuration_id', /** * Filter the payment gateway configuration ID to use specific * gateways for certain WooCommerce billing countries. * * @param int $configuration_id Gateway configuration ID. * @param Payment $payment The payment resource data. * @return int Gateway configuration ID. */ function( $configuration_id, $payment ) { if ( 'woocommerce' !== $payment->get_source() ) { return $configuration_id; } $billing_address = $payment->get_billing_address(); if ( null === $billing_address ) { return $configuration_id; } $id = $configuration_id; switch ( $billing_address->get_country_code() ) { case 'US': $id = \get_option( 'custom_us_gateway_configuration_id', $id ); break; case 'AU': $id = \get_option( 'custom_au_gateway_configuration_id', $id ); break; } if ( 'pronamic_gateway' === \get_post_type( $id ) && 'publish' === \get_post_status( $id ) ) { $configuration_id = $id; } return $configuration_id; }, 10, 2 );
pronamic_gateway_configuration_display_value
\add_filter( 'pronamic_gateway_configuration_display_value', function( $display_value, $post_id ) { return \get_post_meta( $post_id, '_pronamic_gateway_display_value', true ); }, 10, 2 );
pronamic_gateway_configuration_display_value_$id
\add_filter( 'pronamic_gateway_configuration_display_value_payvision', function( $display_value, $post_id ) { return \get_post_meta( $post_id, '_pronamic_gateway_payvision_business_id', true ); }, 10, 2 );