Add hook docs

phpcs rules updated
This commit is contained in:
Alex P 2022-02-17 18:19:55 +02:00
parent 2236b3cfbe
commit fc89021df4
11 changed files with 81 additions and 6 deletions

View file

@ -395,6 +395,9 @@ return array(
* The matrix which countries and currency combinations can be used for DCC.
*/
'api.dcc-supported-country-currency-matrix' => static function ( ContainerInterface $container ) : array {
/**
* Returns which countries and currency combinations can be used for DCC.
*/
return apply_filters(
'woocommerce_paypal_payments_supported_country_currency_matrix',
array(
@ -540,6 +543,9 @@ return array(
* Which countries support which credit cards. Empty credit card arrays mean no restriction on currency.
*/
'api.dcc-supported-country-card-matrix' => static function ( ContainerInterface $container ) : array {
/**
* Returns which countries support which credit cards. Empty credit card arrays mean no restriction on currency.
*/
return apply_filters(
'woocommerce_paypal_payments_supported_country_card_matrix',
array(

View file

@ -105,6 +105,9 @@ class PaymentToken {
* @return array
*/
public static function get_valid_types() {
/**
* Returns a list of valid payment token types.
*/
return apply_filters(
'woocommerce_paypal_payments_valid_payment_token_types',
array(

View file

@ -134,6 +134,9 @@ class PurchaseUnitFactory {
$invoice_id,
$soft_descriptor
);
/**
* Returns PurchaseUnit for the WC order.
*/
return apply_filters(
'woocommerce_paypal_payments_purchase_unit_from_wc_order',
$purchase_unit,

View file

@ -75,10 +75,16 @@ class PartnerReferralsData {
return array(
'partner_config_override' => array(
'partner_logo_url' => 'https://connect.woocommerce.com/images/woocommerce_logo.png',
/**
* Returns the URL which will be opened at the end of onboarding.
*/
'return_url' => apply_filters(
'woocommerce_paypal_payments_partner_config_override_return_url',
admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' )
),
/**
* Returns the description of the URL which will be opened at the end of onboarding.
*/
'return_url_description' => apply_filters(
'woocommerce_paypal_payments_partner_config_override_return_url_description',
__( 'Return to your shop.', 'woocommerce-paypal-payments' )