Rename plugin to "WooCommerce PayPal Payments"

This commit is contained in:
Jorge A. Torres 2020-10-08 20:03:07 -03:00
parent a8c36bc260
commit 02718c6c77
60 changed files with 497 additions and 497 deletions

View file

@ -29,4 +29,4 @@ jobs:
- name: Run test suite - name: Run test suite
run: ./vendor/bin/phpunit run: ./vendor/bin/phpunit
- name: Run Woocommerce coding standards - name: Run Woocommerce coding standards
run: ./vendor/bin/phpcs src modules woocommerce-paypal-commerce-gateway.php --extensions=php run: ./vendor/bin/phpcs src modules woocommerce-paypal-payments.php --extensions=php

View file

@ -1,4 +1,4 @@
# PayPal Payments for WooCommerce # WooCommerce PayPal Payments
PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage. PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
@ -11,7 +11,7 @@ PayPal's latest complete payments processing solution. Accept PayPal, PayPal Cre
## Development ## Development
1. Clone repository 1. Clone repository
2. `$ cd paypal-for-woocommerce` 2. `$ cd woocommerce-paypal-payments`
3. `$ composer install` 3. `$ composer install`
4. `$ yarn run dev` 4. `$ yarn run dev`
5. Change the `PAYPAL_INTEGRATION_DATE` constant to `gmdate( 'Y-m-d' )` to run the latest PayPal JavaScript SDK 5. Change the `PAYPAL_INTEGRATION_DATE` constant to `gmdate( 'Y-m-d' )` to run the latest PayPal JavaScript SDK
@ -22,7 +22,7 @@ Note: PHPUnit needs at least PHP 7.3.
1. `$ composer install` 1. `$ composer install`
2. `$ ./vendor/bin/phpunit` 2. `$ ./vendor/bin/phpunit`
3. `$ ./vendor/bin/phpcs src modules woocommerce-paypal-commerce-gateway.php --extensions=php` 3. `$ ./vendor/bin/phpcs src modules woocommerce-paypal-payments.php --extensions=php`
## Preparation for wordpress.org release ## Preparation for wordpress.org release
@ -71,4 +71,4 @@ Fix the PayPal JavaScript SDK integration date by using the current date for the
## Contributing ## Contributing
All feedback / bug reports / pull requests are welcome. All feedback / bug reports / pull requests are welcome.

View file

@ -1,5 +1,5 @@
{ {
"name": "inpsyde/paypal-payments-for-woocommerce", "name": "woocommerce/woocommerce-paypal-payments",
"type": "wordpress-plugin", "type": "wordpress-plugin",
"description": "PayPal Commerce Platform for WooCommerce", "description": "PayPal Commerce Platform for WooCommerce",
"license": "GPL-2.0", "license": "GPL-2.0",

View file

@ -120,7 +120,7 @@ class PayPalBearer implements Bearer {
if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) { if ( is_wp_error( $response ) || wp_remote_retrieve_response_code( $response ) !== 200 ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not create token.', 'paypal-payments-for-woocommerce' ) __( 'Could not create token.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',

View file

@ -94,7 +94,7 @@ class IdentityToken {
$error = new RuntimeException( $error = new RuntimeException(
__( __(
'Could not create identity token.', 'Could not create identity token.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
) )
); );

View file

@ -89,7 +89,7 @@ class LoginSeller {
$response = $this->request( $url, $args ); $response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not fetch credentials.', 'paypal-payments-for-woocommerce' ) __( 'Could not fetch credentials.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -109,7 +109,7 @@ class LoginSeller {
$json, $json,
$status_code $status_code
) : new RuntimeException( ) : new RuntimeException(
__( 'Credentials not found.', 'paypal-payments-for-woocommerce' ) __( 'Credentials not found.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -158,7 +158,7 @@ class LoginSeller {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not create token.', 'paypal-payments-for-woocommerce' ) __( 'Could not create token.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -179,7 +179,7 @@ class LoginSeller {
$json, $json,
$status_code $status_code
) : new RuntimeException( ) : new RuntimeException(
__( 'No token found.', 'paypal-payments-for-woocommerce' ) __( 'No token found.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',

View file

@ -226,7 +226,7 @@ class OrderEndpoint {
$response = $this->request( $url, $args ); $response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not create order.', 'paypal-payments-for-woocommerce' ) __( 'Could not create order.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -290,7 +290,7 @@ class OrderEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not capture order.', 'paypal-payments-for-woocommerce' ) __( 'Could not capture order.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -357,7 +357,7 @@ class OrderEndpoint {
$error = new RuntimeException( $error = new RuntimeException(
__( __(
'Could not authorize order.', 'Could not authorize order.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
) )
); );
$this->logger->log( $this->logger->log(
@ -418,7 +418,7 @@ class OrderEndpoint {
$response = $this->request( $url, $args ); $response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not retrieve order.', 'paypal-payments-for-woocommerce' ) __( 'Could not retrieve order.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -434,7 +434,7 @@ class OrderEndpoint {
$status_code = (int) wp_remote_retrieve_response_code( $response ); $status_code = (int) wp_remote_retrieve_response_code( $response );
if ( 404 === $status_code || empty( $response['body'] ) ) { if ( 404 === $status_code || empty( $response['body'] ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not retrieve order.', 'paypal-payments-for-woocommerce' ), __( 'Could not retrieve order.', 'woocommerce-paypal-payments' ),
404 404
); );
$this->logger->log( $this->logger->log(
@ -502,7 +502,7 @@ class OrderEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not retrieve order.', 'paypal-payments-for-woocommerce' ) __( 'Could not retrieve order.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',

View file

@ -94,7 +94,7 @@ class PartnerReferrals {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not create referral.', 'paypal-payments-for-woocommerce' ) __( 'Could not create referral.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -131,7 +131,7 @@ class PartnerReferrals {
} }
$error = new RuntimeException( $error = new RuntimeException(
__( 'Action URL not found.', 'paypal-payments-for-woocommerce' ) __( 'Action URL not found.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',

View file

@ -113,7 +113,7 @@ class PartnersEndpoint {
$error = new RuntimeException( $error = new RuntimeException(
__( __(
'Could not fetch sellers status.', 'Could not fetch sellers status.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
) )
); );

View file

@ -97,7 +97,7 @@ class PaymentsEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not get authorized payment info.', 'paypal-payments-for-woocommerce' ) __( 'Could not get authorized payment info.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -156,7 +156,7 @@ class PaymentsEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not capture authorized payment.', 'paypal-payments-for-woocommerce' ) __( 'Could not capture authorized payment.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -216,7 +216,7 @@ class PaymentsEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not refund payment.', 'paypal-payments-for-woocommerce' ) __( 'Could not refund payment.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',

View file

@ -105,7 +105,7 @@ class PaymentTokenEndpoint {
$response = $this->request( $url, $args ); $response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not fetch payment token.', 'paypal-payments-for-woocommerce' ) __( 'Could not fetch payment token.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -143,7 +143,7 @@ class PaymentTokenEndpoint {
$error = new RuntimeException( $error = new RuntimeException(
sprintf( sprintf(
// translators: %d is the customer id. // translators: %d is the customer id.
__( 'No token stored for customer %d.', 'paypal-payments-for-woocommerce' ), __( 'No token stored for customer %d.', 'woocommerce-paypal-payments' ),
$id $id
) )
); );
@ -185,7 +185,7 @@ class PaymentTokenEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Could not delete payment token.', 'paypal-payments-for-woocommerce' ) __( 'Could not delete payment token.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',

View file

@ -101,7 +101,7 @@ class WebhookEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Not able to create a webhook.', 'paypal-payments-for-woocommerce' ) __( 'Not able to create a webhook.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -161,7 +161,7 @@ class WebhookEndpoint {
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Not able to delete the webhook.', 'paypal-payments-for-woocommerce' ) __( 'Not able to delete the webhook.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -223,7 +223,7 @@ class WebhookEndpoint {
$response = $this->request( $url, $args ); $response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) { if ( is_wp_error( $response ) ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Not able to verify webhook event.', 'paypal-payments-for-woocommerce' ) __( 'Not able to verify webhook event.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'warning', 'warning',
@ -251,7 +251,7 @@ class WebhookEndpoint {
if ( ! $webhook->id() ) { if ( ! $webhook->id() ) {
$error = new RuntimeException( $error = new RuntimeException(
__( 'Not a valid webhook to verify.', 'paypal-payments-for-woocommerce' ) __( 'Not a valid webhook to verify.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( 'warning', $error->getMessage(), array( 'webhook' => $webhook ) ); $this->logger->log( 'warning', $error->getMessage(), array( 'webhook' => $webhook ) );
throw $error; throw $error;
@ -282,7 +282,7 @@ class WebhookEndpoint {
// translators: %s is the headers key. // translators: %s is the headers key.
__( __(
'Not a valid webhook event. Header %s is missing', 'Not a valid webhook event. Header %s is missing',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
$key $key
) )

View file

@ -55,7 +55,7 @@ class AuthorizationStatus {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the current status. // translators: %s is the current status.
__( '%s is not a valid status', 'paypal-payments-for-woocommerce' ), __( '%s is not a valid status', 'woocommerce-paypal-payments' ),
$status $status
) )
); );

View file

@ -50,7 +50,7 @@ class OrderStatus {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the current status. // translators: %s is the current status.
__( '%s is not a valid status', 'paypal-payments-for-woocommerce' ), __( '%s is not a valid status', 'woocommerce-paypal-payments' ),
$status $status
) )
); );

View file

@ -52,7 +52,7 @@ class PayerTaxInfo {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the current type. // translators: %s is the current type.
__( '%s is not a valid tax type.', 'paypal-payments-for-woocommerce' ), __( '%s is not a valid tax type.', 'woocommerce-paypal-payments' ),
$type $type
) )
); );

View file

@ -46,7 +46,7 @@ class PaymentToken {
public function __construct( string $id, string $type = self::TYPE_PAYMENT_METHOD_TOKEN ) { public function __construct( string $id, string $type = self::TYPE_PAYMENT_METHOD_TOKEN ) {
if ( ! in_array( $type, self::VALID_TYPES, true ) ) { if ( ! in_array( $type, self::VALID_TYPES, true ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Not a valid payment source type.', 'paypal-payments-for-woocommerce' ) __( 'Not a valid payment source type.', 'woocommerce-paypal-payments' )
); );
} }
$this->id = $id; $this->id = $id;

View file

@ -41,11 +41,11 @@ class PayPalApiException extends RuntimeException {
if ( ! isset( $response->message ) ) { if ( ! isset( $response->message ) ) {
$response->message = __( $response->message = __(
'Unknown error while connecting to PayPal.', 'Unknown error while connecting to PayPal.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
} }
if ( ! isset( $response->name ) ) { if ( ! isset( $response->name ) ) {
$response->name = __( 'Error', 'paypal-payments-for-woocommerce' ); $response->name = __( 'Error', 'woocommerce-paypal-payments' );
} }
if ( ! isset( $response->details ) ) { if ( ! isset( $response->details ) ) {
$response->details = array(); $response->details = array();

View file

@ -71,7 +71,7 @@ class AddressFactory {
public function from_paypal_response( \stdClass $data ): Address { public function from_paypal_response( \stdClass $data ): Address {
if ( ! isset( $data->country_code ) ) { if ( ! isset( $data->country_code ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No country given for address.', 'paypal-payments-for-woocommerce' ) __( 'No country given for address.', 'woocommerce-paypal-payments' )
); );
} }
return new Address( return new Address(

View file

@ -153,11 +153,11 @@ class AmountFactory {
*/ */
public function from_paypal_response( \stdClass $data ): Amount { public function from_paypal_response( \stdClass $data ): Amount {
if ( ! isset( $data->value ) || ! is_numeric( $data->value ) ) { if ( ! isset( $data->value ) || ! is_numeric( $data->value ) ) {
throw new RuntimeException( __( 'No value given', 'paypal-payments-for-woocommerce' ) ); throw new RuntimeException( __( 'No value given', 'woocommerce-paypal-payments' ) );
} }
if ( ! isset( $data->currency_code ) ) { if ( ! isset( $data->currency_code ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No currency given', 'paypal-payments-for-woocommerce' ) __( 'No currency given', 'woocommerce-paypal-payments' )
); );
} }
@ -200,7 +200,7 @@ class AmountFactory {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the current breakdown key. // translators: %s is the current breakdown key.
__( 'No value given for breakdown %s', 'paypal-payments-for-woocommerce' ), __( 'No value given for breakdown %s', 'woocommerce-paypal-payments' ),
$key $key
) )
); );
@ -209,7 +209,7 @@ class AmountFactory {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the current breakdown key. // translators: %s is the current breakdown key.
__( 'No currency given for breakdown %s', 'paypal-payments-for-woocommerce' ), __( 'No currency given for breakdown %s', 'woocommerce-paypal-payments' ),
$key $key
) )
); );

View file

@ -29,13 +29,13 @@ class AuthorizationFactory {
public function from_paypal_response( \stdClass $data ): Authorization { public function from_paypal_response( \stdClass $data ): Authorization {
if ( ! isset( $data->id ) ) { if ( ! isset( $data->id ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Does not contain an id.', 'paypal-payments-for-woocommerce' ) __( 'Does not contain an id.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $data->status ) ) { if ( ! isset( $data->status ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Does not contain status.', 'paypal-payments-for-woocommerce' ) __( 'Does not contain status.', 'woocommerce-paypal-payments' )
); );
} }

View file

@ -120,17 +120,17 @@ class ItemFactory {
public function from_paypal_response( \stdClass $data ): Item { public function from_paypal_response( \stdClass $data ): Item {
if ( ! isset( $data->name ) ) { if ( ! isset( $data->name ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No name for item given', 'paypal-payments-for-woocommerce' ) __( 'No name for item given', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $data->quantity ) || ! is_numeric( $data->quantity ) ) { if ( ! isset( $data->quantity ) || ! is_numeric( $data->quantity ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No quantity for item given', 'paypal-payments-for-woocommerce' ) __( 'No quantity for item given', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $data->unit_amount->value ) || ! isset( $data->unit_amount->currency_code ) ) { if ( ! isset( $data->unit_amount->value ) || ! isset( $data->unit_amount->currency_code ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No money values for item given', 'paypal-payments-for-woocommerce' ) __( 'No money values for item given', 'woocommerce-paypal-payments' )
); );
} }

View file

@ -114,22 +114,22 @@ class OrderFactory {
public function from_paypal_response( \stdClass $order_data ): Order { public function from_paypal_response( \stdClass $order_data ): Order {
if ( ! isset( $order_data->id ) ) { if ( ! isset( $order_data->id ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Order does not contain an id.', 'paypal-payments-for-woocommerce' ) __( 'Order does not contain an id.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $order_data->purchase_units ) || ! is_array( $order_data->purchase_units ) ) { if ( ! isset( $order_data->purchase_units ) || ! is_array( $order_data->purchase_units ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Order does not contain items.', 'paypal-payments-for-woocommerce' ) __( 'Order does not contain items.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $order_data->status ) ) { if ( ! isset( $order_data->status ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Order does not contain status.', 'paypal-payments-for-woocommerce' ) __( 'Order does not contain status.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $order_data->intent ) ) { if ( ! isset( $order_data->intent ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'Order does not contain intent.', 'paypal-payments-for-woocommerce' ) __( 'Order does not contain intent.', 'woocommerce-paypal-payments' )
); );
} }

View file

@ -28,7 +28,7 @@ class PayeeFactory {
public function from_paypal_response( \stdClass $data ) { public function from_paypal_response( \stdClass $data ) {
if ( ! isset( $data->email_address ) ) { if ( ! isset( $data->email_address ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No email for payee given.', 'paypal-payments-for-woocommerce' ) __( 'No email for payee given.', 'woocommerce-paypal-payments' )
); );
} }

View file

@ -28,7 +28,7 @@ class PaymentTokenFactory {
public function from_paypal_response( \stdClass $data ): PaymentToken { public function from_paypal_response( \stdClass $data ): PaymentToken {
if ( ! isset( $data->id ) ) { if ( ! isset( $data->id ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No id for payment token given', 'paypal-payments-for-woocommerce' ) __( 'No id for payment token given', 'woocommerce-paypal-payments' )
); );
} }
return new PaymentToken( return new PaymentToken(

View file

@ -194,7 +194,7 @@ class PurchaseUnitFactory {
public function from_paypal_response( \stdClass $data ): PurchaseUnit { public function from_paypal_response( \stdClass $data ): PurchaseUnit {
if ( ! isset( $data->reference_id ) || ! is_string( $data->reference_id ) ) { if ( ! isset( $data->reference_id ) || ! is_string( $data->reference_id ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No reference ID given.', 'paypal-payments-for-woocommerce' ) __( 'No reference ID given.', 'woocommerce-paypal-payments' )
); );
} }

View file

@ -44,7 +44,7 @@ class ShippingFactory {
// Replicates the Behavior of \WC_Order::get_formatted_shipping_full_name(). // Replicates the Behavior of \WC_Order::get_formatted_shipping_full_name().
$full_name = sprintf( $full_name = sprintf(
// translators: %1$s is the first name and %2$s is the second name. wc translation. // translators: %1$s is the first name and %2$s is the second name. wc translation.
_x( '%1$s %2$s', 'full name', 'paypal-payments-for-woocommerce' ), _x( '%1$s %2$s', 'full name', 'woocommerce-paypal-payments' ),
$customer->get_shipping_first_name(), $customer->get_shipping_first_name(),
$customer->get_shipping_last_name() $customer->get_shipping_last_name()
); );
@ -82,12 +82,12 @@ class ShippingFactory {
public function from_paypal_response( \stdClass $data ): Shipping { public function from_paypal_response( \stdClass $data ): Shipping {
if ( ! isset( $data->name->full_name ) ) { if ( ! isset( $data->name->full_name ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No name was given for shipping.', 'paypal-payments-for-woocommerce' ) __( 'No name was given for shipping.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $data->address ) ) { if ( ! isset( $data->address ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No address was given for shipping.', 'paypal-payments-for-woocommerce' ) __( 'No address was given for shipping.', 'woocommerce-paypal-payments' )
); );
} }
$address = $this->address_factory->from_paypal_response( $data->address ); $address = $this->address_factory->from_paypal_response( $data->address );

View file

@ -60,17 +60,17 @@ class WebhookFactory {
public function from_paypal_response( \stdClass $data ): Webhook { public function from_paypal_response( \stdClass $data ): Webhook {
if ( ! isset( $data->id ) ) { if ( ! isset( $data->id ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No id for webhook given.', 'paypal-payments-for-woocommerce' ) __( 'No id for webhook given.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $data->url ) ) { if ( ! isset( $data->url ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No URL for webhook given.', 'paypal-payments-for-woocommerce' ) __( 'No URL for webhook given.', 'woocommerce-paypal-payments' )
); );
} }
if ( ! isset( $data->event_types ) ) { if ( ! isset( $data->event_types ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No event types for webhook given.', 'paypal-payments-for-woocommerce' ) __( 'No event types for webhook given.', 'woocommerce-paypal-payments' )
); );
} }

View file

@ -79,7 +79,7 @@ class PartnerReferralsData {
), ),
'return_url_description' => __( 'return_url_description' => __(
'Return to your shop.', 'Return to your shop.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'show_add_credit_card' => true, 'show_add_credit_card' => true,
), ),

View file

@ -88,7 +88,7 @@ return array(
'button.url' => static function ( $container ): string { 'button.url' => static function ( $container ): string {
return plugins_url( return plugins_url(
'/modules/ppcp-button/', '/modules/ppcp-button/',
dirname( __FILE__, 3 ) . '/woocommerce-paypal-commerce-gateway.php' dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
); );
}, },
'button.request-data' => static function ( $container ): RequestData { 'button.request-data' => static function ( $container ): RequestData {

View file

@ -518,19 +518,19 @@ class SmartButton implements SmartButtonInterface {
> >
</div>', </div>',
esc_attr( $id ), esc_attr( $id ),
esc_html__( 'Save your card', 'paypal-payments-for-woocommerce' ) esc_html__( 'Save your card', 'woocommerce-paypal-payments' )
) : ''; ) : '';
$label = 'checkout' === $this->context() ? __( 'Place order', 'paypal-payments-for-woocommerce' ) : __( 'Pay for order', 'paypal-payments-for-woocommerce' ); $label = 'checkout' === $this->context() ? __( 'Place order', 'woocommerce-paypal-payments' ) : __( 'Pay for order', 'woocommerce-paypal-payments' );
printf( printf(
'<div id="%1$s" style="display:none;"> '<div id="%1$s" style="display:none;">
<button class="button alt">%6$s</button> <button class="button alt">%6$s</button>
</div><div id="payments-sdk__contingency-lightbox"></div><style id="ppcp-hide-dcc">.payment_method_ppcp-credit-card-gateway {display:none;}</style>', </div><div id="payments-sdk__contingency-lightbox"></div><style id="ppcp-hide-dcc">.payment_method_ppcp-credit-card-gateway {display:none;}</style>',
esc_attr( $id ), esc_attr( $id ),
esc_html__( 'Credit Card number', 'paypal-payments-for-woocommerce' ), esc_html__( 'Credit Card number', 'woocommerce-paypal-payments' ),
esc_html__( 'Expiration', 'paypal-payments-for-woocommerce' ), esc_html__( 'Expiration', 'woocommerce-paypal-payments' ),
esc_html__( 'CVV', 'paypal-payments-for-woocommerce' ), esc_html__( 'CVV', 'woocommerce-paypal-payments' ),
//phpcs:ignore //phpcs:ignore
$save_card, $save_card,
esc_html( $label ) esc_html( $label )
@ -633,14 +633,14 @@ class SmartButton implements SmartButtonInterface {
'labels' => array( 'labels' => array(
'credit_card_number' => '', 'credit_card_number' => '',
'cvv' => '', 'cvv' => '',
'mm_yyyy' => __( 'MM/YYYY', 'paypal-payments-for-woocommerce' ), 'mm_yyyy' => __( 'MM/YYYY', 'woocommerce-paypal-payments' ),
'fields_not_valid' => __( 'fields_not_valid' => __(
'Unfortunatly, your credit card details are not valid.', 'Unfortunatly, your credit card details are not valid.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'card_not_supported' => __( 'card_not_supported' => __(
'Unfortunatly, we do not support your credit card.', 'Unfortunatly, we do not support your credit card.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
), ),
'valid_cards' => $this->dcc_applies->valid_cards(), 'valid_cards' => $this->dcc_applies->valid_cards(),
@ -650,7 +650,7 @@ class SmartButton implements SmartButtonInterface {
'error' => array( 'error' => array(
'generic' => __( 'generic' => __(
'Something went wrong. Please try again or choose another payment source.', 'Something went wrong. Please try again or choose another payment source.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
), ),
), ),

View file

@ -116,7 +116,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
$data = $this->request_data->read_request( $this->nonce() ); $data = $this->request_data->read_request( $this->nonce() );
if ( ! isset( $data['order_id'] ) ) { if ( ! isset( $data['order_id'] ) ) {
throw new RuntimeException( throw new RuntimeException(
__( 'No order id given', 'paypal-payments-for-woocommerce' ) __( 'No order id given', 'woocommerce-paypal-payments' )
); );
} }
@ -125,7 +125,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the id of the order. // translators: %s is the id of the order.
__( 'Order %s not found.', 'paypal-payments-for-woocommerce' ), __( 'Order %s not found.', 'woocommerce-paypal-payments' ),
$data['order_id'] $data['order_id']
) )
); );
@ -143,7 +143,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException( throw new RuntimeException(
__( __(
'Unfortunately, we do not accept this card.', 'Unfortunately, we do not accept this card.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
100 100
); );
@ -154,7 +154,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException( throw new RuntimeException(
__( __(
'Something went wrong. Please try again.', 'Something went wrong. Please try again.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
) )
); );
} }
@ -162,7 +162,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException( throw new RuntimeException(
__( __(
'Unfortunatly, we can\'t accept your card. Please choose a different payment method.', 'Unfortunatly, we can\'t accept your card. Please choose a different payment method.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
) )
); );
} }
@ -174,7 +174,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException( throw new RuntimeException(
sprintf( sprintf(
// translators: %s is the id of the order. // translators: %s is the id of the order.
__( 'Order %s is not approved yet.', 'paypal-payments-for-woocommerce' ), __( 'Order %s is not approved yet.', 'woocommerce-paypal-payments' ),
$data['order_id'] $data['order_id']
) )
); );

View file

@ -127,7 +127,7 @@ class ChangeCartEndpoint implements EndpointInterface {
'name' => '', 'name' => '',
'message' => __( 'message' => __(
'Necessary fields not defined. Action aborted.', 'Necessary fields not defined. Action aborted.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'code' => 0, 'code' => 0,
'details' => array(), 'details' => array(),
@ -166,7 +166,7 @@ class ChangeCartEndpoint implements EndpointInterface {
$message = __( $message = __(
'Something went wrong. Action aborted', 'Something went wrong. Action aborted',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
$errors = wc_get_notices( 'error' ); $errors = wc_get_notices( 'error' );
if ( count( $errors ) ) { if ( count( $errors ) ) {

View file

@ -150,7 +150,7 @@ class CreateOrderEndpoint implements EndpointInterface {
wp_send_json_error( wp_send_json_error(
array( array(
'name' => 'order-not-found', 'name' => 'order-not-found',
'message' => __( 'Order not found', 'paypal-payments-for-woocommerce' ), 'message' => __( 'Order not found', 'woocommerce-paypal-payments' ),
'code' => 0, 'code' => 0,
'details' => array(), 'details' => array(),
) )
@ -284,7 +284,7 @@ class CreateOrderEndpoint implements EndpointInterface {
$parsed_values = wp_parse_args( $form_values ); $parsed_values = wp_parse_args( $form_values );
if ( ! isset( $parsed_values['terms'] ) ) { if ( ! isset( $parsed_values['terms'] ) ) {
throw new \RuntimeException( throw new \RuntimeException(
__( 'Please read and accept the terms and conditions to proceed with your order.', 'paypal-payments-for-woocommerce' ) __( 'Please read and accept the terms and conditions to proceed with your order.', 'woocommerce-paypal-payments' )
); );
} }
} }

View file

@ -48,7 +48,7 @@ class RequestData {
) { ) {
remove_filter( 'nonce_user_logged_out', array( $this, 'nonce_fix' ), 100 ); remove_filter( 'nonce_user_logged_out', array( $this, 'nonce_fix' ), 100 );
throw new RuntimeException( throw new RuntimeException(
__( 'Could not validate nonce.', 'paypal-payments-for-woocommerce' ) __( 'Could not validate nonce.', 'woocommerce-paypal-payments' )
); );
} }
$this->dequeue_nonce_fix(); $this->dequeue_nonce_fix();

View file

@ -131,7 +131,7 @@ return array(
'onboarding.url' => static function ( $container ): string { 'onboarding.url' => static function ( $container ): string {
return plugins_url( return plugins_url(
'/modules/ppcp-onboarding/', '/modules/ppcp-onboarding/',
dirname( __FILE__, 3 ) . '/woocommerce-paypal-commerce-gateway.php' dirname( __FILE__, 3 ) . '/woocommerce-paypal-payments.php'
); );
}, },

View file

@ -66,7 +66,7 @@ class OnboardingRenderer {
$url = $is_production ? $this->production_partner_referrals->signup_link() : $this->sandbox_partner_referrals->signup_link(); $url = $is_production ? $this->production_partner_referrals->signup_link() : $this->sandbox_partner_referrals->signup_link();
$url = add_query_arg( $args, $url ); $url = add_query_arg( $args, $url );
$id = $is_production ? 'connect-to-production' : 'connect-to-sandbox'; $id = $is_production ? 'connect-to-production' : 'connect-to-sandbox';
$label = $is_production ? __( 'Connect to PayPal', 'paypal-payments-for-woocommerce' ) : __( 'Connect to PayPal Sandbox', 'paypal-payments-for-woocommerce' ); $label = $is_production ? __( 'Connect to PayPal', 'woocommerce-paypal-payments' ) : __( 'Connect to PayPal Sandbox', 'woocommerce-paypal-payments' );
$this->render_button( $this->render_button(
$url, $url,
$id, $id,
@ -83,7 +83,7 @@ class OnboardingRenderer {
} catch ( RuntimeException $exception ) { } catch ( RuntimeException $exception ) {
esc_html_e( esc_html_e(
'We could not properly connect to PayPal. Please reload the page to continue', 'We could not properly connect to PayPal. Please reload the page to continue',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
} }
} }

View file

@ -30,7 +30,7 @@ class CancelView {
esc_html__( esc_html__(
'You are currently paying with PayPal. If you want to cancel 'You are currently paying with PayPal. If you want to cancel
this process, please click %1$shere%2$s.', this process, please click %1$shere%2$s.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'<a href="' . esc_url( $url ) . '">', '<a href="' . esc_url( $url ) . '">',
'</a>' '</a>'

View file

@ -94,7 +94,7 @@ class RenewalHandler {
'info', 'info',
sprintf( sprintf(
// translators: %d is the id of the order. // translators: %d is the id of the order.
__( 'Start moneytransfer for order %d', 'paypal-payments-for-woocommerce' ), __( 'Start moneytransfer for order %d', 'woocommerce-paypal-payments' ),
(int) $wc_order->get_id() (int) $wc_order->get_id()
), ),
array( array(
@ -111,7 +111,7 @@ class RenewalHandler {
// translators: %1$d is the order number, %2$s the error message. // translators: %1$d is the order number, %2$s the error message.
__( __(
'An error occured while trying to renew the subscription for order %1$d: %2$s', 'An error occured while trying to renew the subscription for order %1$d: %2$s',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(int) $wc_order->get_id(), (int) $wc_order->get_id(),
$error->getMessage() $error->getMessage()
@ -129,7 +129,7 @@ class RenewalHandler {
// translators: %d is the order number. // translators: %d is the order number.
__( __(
'Moneytransfer for order %d is completed.', 'Moneytransfer for order %d is completed.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(int) $wc_order->get_id() (int) $wc_order->get_id()
), ),
@ -183,7 +183,7 @@ class RenewalHandler {
// translators: %d is the customer id. // translators: %d is the customer id.
__( __(
'No payment token found for customer %d', 'No payment token found for customer %d',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(int) $customer->get_id() (int) $customer->get_id()
), ),
@ -208,7 +208,7 @@ class RenewalHandler {
if ( $order->intent() === 'CAPTURE' && $order->status()->is( OrderStatus::COMPLETED ) ) { if ( $order->intent() === 'CAPTURE' && $order->status()->is( OrderStatus::COMPLETED ) ) {
$wc_order->update_status( $wc_order->update_status(
'processing', 'processing',
__( 'Payment received.', 'paypal-payments-for-woocommerce' ) __( 'Payment received.', 'woocommerce-paypal-payments' )
); );
\WC_Subscriptions_Manager::process_subscription_payments_on_order( $wc_order ); \WC_Subscriptions_Manager::process_subscription_payments_on_order( $wc_order );
} }

File diff suppressed because it is too large Load diff

View file

@ -56,7 +56,7 @@ class OrderTablePaymentStatusColumn {
$columns = array_merge( $columns = array_merge(
array_slice( $columns, 0, $to_insert_position ), array_slice( $columns, 0, $to_insert_position ),
array( array(
self::COLUMN_KEY => __( 'Payment Captured', 'paypal-payments-for-woocommerce' ), self::COLUMN_KEY => __( 'Payment Captured', 'woocommerce-paypal-payments' ),
), ),
array_slice( $columns, $to_insert_position ) array_slice( $columns, $to_insert_position )
); );
@ -124,7 +124,7 @@ class OrderTablePaymentStatusColumn {
'<span class="dashicons dashicons-yes"> '<span class="dashicons dashicons-yes">
<span class="screen-reader-text">%s</span> <span class="screen-reader-text">%s</span>
</span>', </span>',
esc_html__( 'Payment captured', 'paypal-payments-for-woocommerce' ) esc_html__( 'Payment captured', 'woocommerce-paypal-payments' )
); );
} }
@ -134,7 +134,7 @@ class OrderTablePaymentStatusColumn {
private function render_incomplete_status() { private function render_incomplete_status() {
printf( printf(
'<mark class="onbackorder">%s</mark>', '<mark class="onbackorder">%s</mark>',
esc_html__( 'Not captured', 'paypal-payments-for-woocommerce' ) esc_html__( 'Not captured', 'woocommerce-paypal-payments' )
); );
} }
} }

View file

@ -39,11 +39,11 @@ class PaymentStatusOrderDetail {
'<li class="wide"><p><mark class="order-status status-on-hold"><span>%1$s</span></mark></p><p>%2$s</p></li>', '<li class="wide"><p><mark class="order-status status-on-hold"><span>%1$s</span></mark></p><p>%2$s</p></li>',
esc_html__( esc_html__(
'Not captured', 'Not captured',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
esc_html__( esc_html__(
'To capture the payment select capture action from the list below.', 'To capture the payment select capture action from the list below.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
) )
); );
} }

View file

@ -32,7 +32,7 @@ class RenderAuthorizeAction {
$order_actions['ppcp_authorize_order'] = esc_html__( $order_actions['ppcp_authorize_order'] = esc_html__(
'Capture authorized PayPal payment', 'Capture authorized PayPal payment',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
return $order_actions; return $order_actions;
} }

View file

@ -103,11 +103,11 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
$this->method_title = __( $this->method_title = __(
'PayPal Card Processing', 'PayPal Card Processing',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
$this->method_description = __( $this->method_description = __(
'Accept debit and credit cards, and local payment methods with PayPals latest solution.', 'Accept debit and credit cards, and local payment methods with PayPals latest solution.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
$this->title = $this->config->has( 'dcc_gateway_title' ) ? $this->title = $this->config->has( 'dcc_gateway_title' ) ?
$this->config->get( 'dcc_gateway_title' ) : $this->method_title; $this->config->get( 'dcc_gateway_title' ) : $this->method_title;
@ -134,9 +134,9 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
public function init_form_fields() { public function init_form_fields() {
$this->form_fields = array( $this->form_fields = array(
'enabled' => array( 'enabled' => array(
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ), 'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'label' => __( 'Enable Credit Card Payments', 'paypal-payments-for-woocommerce' ), 'label' => __( 'Enable Credit Card Payments', 'woocommerce-paypal-payments' ),
'default' => 'no', 'default' => 'no',
), ),
'ppcp' => array( 'ppcp' => array(
@ -187,37 +187,37 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
'visa' => _x( 'visa' => _x(
'Visa', 'Visa',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'mastercard' => _x( 'mastercard' => _x(
'Mastercard', 'Mastercard',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'amex' => _x( 'amex' => _x(
'American Express', 'American Express',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'discover' => _x( 'discover' => _x(
'Discover', 'Discover',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'jcb' => _x( 'jcb' => _x(
'JCB', 'JCB',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'elo' => _x( 'elo' => _x(
'Elo', 'Elo',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'hiper' => _x( 'hiper' => _x(
'Hiper', 'Hiper',
'Name of credit card', 'Name of credit card',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
); );
} }

View file

@ -173,11 +173,11 @@ class PayPalGateway extends \WC_Payment_Gateway {
public function init_form_fields() { public function init_form_fields() {
$this->form_fields = array( $this->form_fields = array(
'enabled' => array( 'enabled' => array(
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ), 'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
'type' => 'checkbox', 'type' => 'checkbox',
'desc_tip' => true, 'desc_tip' => true,
'description' => __( 'In order to use PayPal or PayPal Card Processing, you need to enable the Gateway.', 'paypal-payments-for-woocommerce' ), 'description' => __( 'In order to use PayPal or PayPal Card Processing, you need to enable the Gateway.', 'woocommerce-paypal-payments' ),
'label' => __( 'Enable the PayPal Gateway', 'paypal-payments-for-woocommerce' ), 'label' => __( 'Enable the PayPal Gateway', 'woocommerce-paypal-payments' ),
'default' => 'no', 'default' => 'no',
), ),
'ppcp' => array( 'ppcp' => array(
@ -204,7 +204,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $is_processed ) { if ( $is_processed ) {
$wc_order->add_order_note( $wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' ) __( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
); );
$wc_order->set_status( 'processing' ); $wc_order->set_status( 'processing' );
@ -216,7 +216,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $this->authorized_payments->last_status() === AuthorizedPaymentsProcessor::ALREADY_CAPTURED ) { if ( $this->authorized_payments->last_status() === AuthorizedPaymentsProcessor::ALREADY_CAPTURED ) {
if ( $wc_order->get_status() === 'on-hold' ) { if ( $wc_order->get_status() === 'on-hold' ) {
$wc_order->add_order_note( $wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' ) __( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
); );
$wc_order->set_status( 'processing' ); $wc_order->set_status( 'processing' );
} }
@ -268,12 +268,12 @@ class PayPalGateway extends \WC_Payment_Gateway {
*/ */
private function define_method_title(): string { private function define_method_title(): string {
if ( $this->is_credit_card_tab() ) { if ( $this->is_credit_card_tab() ) {
return __( 'PayPal Card Processing', 'paypal-payments-for-woocommerce' ); return __( 'PayPal Card Processing', 'woocommerce-paypal-payments' );
} }
if ( $this->is_paypal_tab() ) { if ( $this->is_paypal_tab() ) {
return __( 'PayPal Checkout', 'paypal-payments-for-woocommerce' ); return __( 'PayPal Checkout', 'woocommerce-paypal-payments' );
} }
return __( 'PayPal', 'paypal-payments-for-woocommerce' ); return __( 'PayPal', 'woocommerce-paypal-payments' );
} }
/** /**
@ -285,13 +285,13 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $this->is_credit_card_tab() ) { if ( $this->is_credit_card_tab() ) {
return __( return __(
'Accept debit and credit cards, and local payment methods with PayPals latest solution.', 'Accept debit and credit cards, and local payment methods with PayPals latest solution.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
} }
return __( return __(
'Accept PayPal, PayPal Credit and alternative payment types with PayPals latest solution.', 'Accept PayPal, PayPal Credit and alternative payment types with PayPals latest solution.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
} }

View file

@ -59,7 +59,7 @@ trait ProcessPaymentTrait {
if ( $this->session_handler->insufficient_funding_tries() >= 3 ) { if ( $this->session_handler->insufficient_funding_tries() >= 3 ) {
$this->session_handler->destroy_session_data(); $this->session_handler->destroy_session_data();
wc_add_notice( wc_add_notice(
__( 'Please use a different payment method.', 'paypal-payments-for-woocommerce' ), __( 'Please use a different payment method.', 'woocommerce-paypal-payments' ),
'error' 'error'
); );
return null; return null;

View file

@ -48,35 +48,35 @@ class AuthorizeOrderActionNotice {
$messages[ self::NO_INFO ] = array( $messages[ self::NO_INFO ] = array(
'message' => __( 'message' => __(
'Could not retrieve information. Try again later.', 'Could not retrieve information. Try again later.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'type' => 'error', 'type' => 'error',
); );
$messages[ self::ALREADY_CAPTURED ] = array( $messages[ self::ALREADY_CAPTURED ] = array(
'message' => __( 'message' => __(
'Payment already captured.', 'Payment already captured.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'type' => 'error', 'type' => 'error',
); );
$messages[ self::FAILED ] = array( $messages[ self::FAILED ] = array(
'message' => __( 'message' => __(
'Failed to capture. Try again later.', 'Failed to capture. Try again later.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'type' => 'error', 'type' => 'error',
); );
$messages[ self::NOT_FOUND ] = array( $messages[ self::NOT_FOUND ] = array(
'message' => __( 'message' => __(
'Could not find payment to process.', 'Could not find payment to process.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'type' => 'error', 'type' => 'error',
); );
$messages[ self::SUCCESS ] = array( $messages[ self::SUCCESS ] = array(
'message' => __( 'message' => __(
'Payment successfully captured.', 'Payment successfully captured.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'type' => 'success', 'type' => 'success',
); );

View file

@ -58,7 +58,7 @@ class ConnectAdminNotice {
/* translators: %1$s the gateway name. */ /* translators: %1$s the gateway name. */
__( __(
'PayPal Checkout is almost ready. To get started, <a href="%1$s">connect your account</a>.', 'PayPal Checkout is almost ready. To get started, <a href="%1$s">connect your account</a>.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' ) admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' )
); );

View file

@ -141,13 +141,13 @@ class OrderProcessor {
if ( ! $order || ! $this->order_is_approved( $order ) ) { if ( ! $order || ! $this->order_is_approved( $order ) ) {
$error_message = __( $error_message = __(
'The payment has not been approved yet.', 'The payment has not been approved yet.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
} }
if ( $error_message ) { if ( $error_message ) {
$this->last_error = sprintf( $this->last_error = sprintf(
// translators: %s is the message of the error. // translators: %s is the message of the error.
__( 'Payment error: %s', 'paypal-payments-for-woocommerce' ), __( 'Payment error: %s', 'woocommerce-paypal-payments' ),
$error_message $error_message
); );
return false; return false;
@ -165,18 +165,18 @@ class OrderProcessor {
$wc_order->update_status( $wc_order->update_status(
'on-hold', 'on-hold',
__( 'Awaiting payment.', 'paypal-payments-for-woocommerce' ) __( 'Awaiting payment.', 'woocommerce-paypal-payments' )
); );
if ( $order->status()->is( OrderStatus::COMPLETED ) && $order->intent() === 'CAPTURE' ) { if ( $order->status()->is( OrderStatus::COMPLETED ) && $order->intent() === 'CAPTURE' ) {
$wc_order->update_status( $wc_order->update_status(
'processing', 'processing',
__( 'Payment received.', 'paypal-payments-for-woocommerce' ) __( 'Payment received.', 'woocommerce-paypal-payments' )
); );
} }
if ( $this->capture_authorized_downloads( $order ) && $this->authorized_payments_processor->process( $wc_order ) ) { if ( $this->capture_authorized_downloads( $order ) && $this->authorized_payments_processor->process( $wc_order ) ) {
$wc_order->add_order_note( $wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' ) __( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
); );
$wc_order->update_meta_data( PayPalGateway::CAPTURED_META_KEY, 'true' ); $wc_order->update_meta_data( PayPalGateway::CAPTURED_META_KEY, 'true' );
$wc_order->update_status( 'processing' ); $wc_order->update_status( 'processing' );

View file

@ -41,8 +41,8 @@ class SectionsRenderer {
//phpcs:ignore WordPress.Security.NonceVerification.Recommended //phpcs:ignore WordPress.Security.NonceVerification.Recommended
$current = ! isset( $_GET[ self::KEY ] ) ? PayPalGateway::ID : sanitize_text_field( wp_unslash( $_GET[ self::KEY ] ) ); $current = ! isset( $_GET[ self::KEY ] ) ? PayPalGateway::ID : sanitize_text_field( wp_unslash( $_GET[ self::KEY ] ) );
$sections = array( $sections = array(
PayPalGateway::ID => __( 'PayPal Checkout', 'paypal-payments-for-woocommerce' ), PayPalGateway::ID => __( 'PayPal Checkout', 'woocommerce-paypal-payments' ),
CreditCardGateway::ID => __( 'PayPal Card Processing', 'paypal-payments-for-woocommerce' ), CreditCardGateway::ID => __( 'PayPal Card Processing', 'woocommerce-paypal-payments' ),
); );
echo '<ul class="subsubsub">'; echo '<ul class="subsubsub">';

View file

@ -86,19 +86,19 @@ class Settings implements ContainerInterface {
$this->settings = get_option( self::KEY, array() ); $this->settings = get_option( self::KEY, array() );
$defaults = array( $defaults = array(
'title' => __( 'PayPal', 'paypal-payments-for-woocommerce' ), 'title' => __( 'PayPal', 'woocommerce-paypal-payments' ),
'description' => __( 'description' => __(
'Pay via PayPal.', 'Pay via PayPal.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'button_single_product_enabled' => true, 'button_single_product_enabled' => true,
'button_mini-cart_enabled' => true, 'button_mini-cart_enabled' => true,
'button_cart_enabled' => true, 'button_cart_enabled' => true,
'brand_name' => get_bloginfo( 'name' ), 'brand_name' => get_bloginfo( 'name' ),
'dcc_gateway_title' => __( 'Credit Cards', 'paypal-payments-for-woocommerce' ), 'dcc_gateway_title' => __( 'Credit Cards', 'woocommerce-paypal-payments' ),
'dcc_gateway_description' => __( 'dcc_gateway_description' => __(
'Pay with your credit card.', 'Pay with your credit card.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
); );
foreach ( $defaults as $key => $value ) { foreach ( $defaults as $key => $value ) {

View file

@ -111,7 +111,7 @@ class SettingsRenderer {
new Message( new Message(
__( __(
'We could not complete the onboarding process. Some features, such as card processing, will not be available. To fix this, please try again.', 'We could not complete the onboarding process. Some features, such as card processing, will not be available. To fix this, please try again.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'error', 'error',
false false
@ -367,13 +367,13 @@ class SettingsRenderer {
private function render_dcc_not_active_yet() { private function render_dcc_not_active_yet() {
?> ?>
<tr> <tr>
<th><?php esc_html_e( 'Onboarding', 'paypal-payments-for-woocommerce' ); ?></th> <th><?php esc_html_e( 'Onboarding', 'woocommerce-paypal-payments' ); ?></th>
<td class="notice notice-error"> <td class="notice notice-error">
<p> <p>
<?php <?php
esc_html_e( esc_html_e(
'Credit Card processing for your account has not yet been activated by PayPal. If your account is new, this can take some days. Otherwise, please get in contact with PayPal.', 'Credit Card processing for your account has not yet been activated by PayPal. If your account is new, this can take some days. Otherwise, please get in contact with PayPal.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
?> ?>
</p> </p>
@ -388,7 +388,7 @@ class SettingsRenderer {
private function render_3d_secure_info() { private function render_3d_secure_info() {
?> ?>
<tr> <tr>
<th><?php esc_html_e( '3D Secure', 'paypal-payments-for-woocommerce' ); ?></th> <th><?php esc_html_e( '3D Secure', 'woocommerce-paypal-payments' ); ?></th>
<td> <td>
<p> <p>
<?php <?php
@ -405,7 +405,7 @@ class SettingsRenderer {
an additional layer of verification using Verified by Visa, an additional layer of verification using Verified by Visa,
MasterCard SecureCode and American Express SafeKey. MasterCard SecureCode and American Express SafeKey.
%1$sLearn more about 3D Secure.%2$s', %1$sLearn more about 3D Secure.%2$s',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
'<a href = "#">', '<a href = "#">',
'</a>' '</a>'
@ -424,20 +424,20 @@ class SettingsRenderer {
private function render_dcc_onboarding_info() { private function render_dcc_onboarding_info() {
?> ?>
<tr> <tr>
<th><?php esc_html_e( 'Onboarding', 'paypal-payments-for-woocommerce' ); ?></th> <th><?php esc_html_e( 'Onboarding', 'woocommerce-paypal-payments' ); ?></th>
<td class="notice notice-error"> <td class="notice notice-error">
<p> <p>
<?php <?php
esc_html_e( esc_html_e(
'You need to complete your onboarding, before you can use the PayPal Card Processing option.', 'You need to complete your onboarding, before you can use the PayPal Card Processing option.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
?> ?>
<a <a
href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' ) ); ?>" href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=checkout&section=ppcp-gateway' ) ); ?>"
> >
<?php esc_html_e( 'Click here to complete your onboarding.', 'paypal-payments-for-woocommerce' ); ?> <?php esc_html_e( 'Click here to complete your onboarding.', 'woocommerce-paypal-payments' ); ?>
</a> </a>
</p> </p>
</td> </td>
@ -451,13 +451,13 @@ class SettingsRenderer {
private function render_dcc_does_not_apply_info() { private function render_dcc_does_not_apply_info() {
?> ?>
<tr> <tr>
<th><?php esc_html_e( 'Card Processing not available', 'paypal-payments-for-woocommerce' ); ?></th> <th><?php esc_html_e( 'Card Processing not available', 'woocommerce-paypal-payments' ); ?></th>
<td class="notice notice-error"> <td class="notice notice-error">
<p> <p>
<?php <?php
esc_html_e( esc_html_e(
'Unfortunatly, the card processing option is not yet available in your country.', 'Unfortunatly, the card processing option is not yet available in your country.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
); );
?> ?>
</p> </p>

View file

@ -97,7 +97,7 @@ class CheckoutOrderApproved implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No order for webhook event %s was found.', 'No order for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -120,7 +120,7 @@ class CheckoutOrderApproved implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No paypal payment for webhook event %s was found.', 'No paypal payment for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -143,7 +143,7 @@ class CheckoutOrderApproved implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'Could not capture payment for webhook event %s.', 'Could not capture payment for webhook event %s.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -173,7 +173,7 @@ class CheckoutOrderApproved implements RequestHandler {
if ( ! $wc_orders ) { if ( ! $wc_orders ) {
$message = sprintf( $message = sprintf(
// translators: %s is the PayPal order Id. // translators: %s is the PayPal order Id.
__( 'Order for PayPal order %s not found.', 'paypal-payments-for-woocommerce' ), __( 'Order for PayPal order %s not found.', 'woocommerce-paypal-payments' ),
isset( $request['resource']['id'] ) ? $request['resource']['id'] : '' isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
); );
$this->logger->log( $this->logger->log(
@ -189,8 +189,8 @@ class CheckoutOrderApproved implements RequestHandler {
$new_status = $order->intent() === 'CAPTURE' ? 'processing' : 'on-hold'; $new_status = $order->intent() === 'CAPTURE' ? 'processing' : 'on-hold';
$status_message = $order->intent() === 'CAPTURE' ? $status_message = $order->intent() === 'CAPTURE' ?
__( 'Payment received.', 'paypal-payments-for-woocommerce' ) __( 'Payment received.', 'woocommerce-paypal-payments' )
: __( 'Payment can be captured.', 'paypal-payments-for-woocommerce' ); : __( 'Payment can be captured.', 'woocommerce-paypal-payments' );
foreach ( $wc_orders as $wc_order ) { foreach ( $wc_orders as $wc_order ) {
if ( ! in_array( $wc_order->get_status(), array( 'pending', 'on-hold' ), true ) ) { if ( ! in_array( $wc_order->get_status(), array( 'pending', 'on-hold' ), true ) ) {
continue; continue;
@ -210,7 +210,7 @@ class CheckoutOrderApproved implements RequestHandler {
// translators: %s is the order ID. // translators: %s is the order ID.
__( __(
'Order %s has been updated through PayPal', 'Order %s has been updated through PayPal',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(string) $wc_order->get_id() (string) $wc_order->get_id()
), ),

View file

@ -86,7 +86,7 @@ class CheckoutOrderCompleted implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No order for webhook event %s was found.', 'No order for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -116,7 +116,7 @@ class CheckoutOrderCompleted implements RequestHandler {
if ( ! $wc_orders ) { if ( ! $wc_orders ) {
$message = sprintf( $message = sprintf(
// translators: %s is the PayPal order Id. // translators: %s is the PayPal order Id.
__( 'Order for PayPal order %s not found.', 'paypal-payments-for-woocommerce' ), __( 'Order for PayPal order %s not found.', 'woocommerce-paypal-payments' ),
isset( $request['resource']['id'] ) ? $request['resource']['id'] : '' isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
); );
$this->logger->log( $this->logger->log(
@ -141,7 +141,7 @@ class CheckoutOrderCompleted implements RequestHandler {
*/ */
$wc_order->update_status( $wc_order->update_status(
'processing', 'processing',
__( 'Payment received.', 'paypal-payments-for-woocommerce' ) __( 'Payment received.', 'woocommerce-paypal-payments' )
); );
$this->logger->log( $this->logger->log(
'info', 'info',
@ -149,7 +149,7 @@ class CheckoutOrderCompleted implements RequestHandler {
// translators: %s is the order ID. // translators: %s is the order ID.
__( __(
'Order %s has been updated through PayPal', 'Order %s has been updated through PayPal',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(string) $wc_order->get_id() (string) $wc_order->get_id()
), ),

View file

@ -73,7 +73,7 @@ class PaymentCaptureCompleted implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No order for webhook event %s was found.', 'No order for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -94,7 +94,7 @@ class PaymentCaptureCompleted implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No order for webhook event %s was found.', 'No order for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -114,7 +114,7 @@ class PaymentCaptureCompleted implements RequestHandler {
return rest_ensure_response( $response ); return rest_ensure_response( $response );
} }
$wc_order->add_order_note( $wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' ) __( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
); );
$wc_order->set_status( 'processing' ); $wc_order->set_status( 'processing' );
@ -126,7 +126,7 @@ class PaymentCaptureCompleted implements RequestHandler {
// translators: %s is the order ID. // translators: %s is the order ID.
__( __(
'Order %s has been updated through PayPal', 'Order %s has been updated through PayPal',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(string) $wc_order->get_id() (string) $wc_order->get_id()
), ),

View file

@ -72,7 +72,7 @@ class PaymentCaptureRefunded implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No order for webhook event %s was found.', 'No order for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -91,7 +91,7 @@ class PaymentCaptureRefunded implements RequestHandler {
if ( ! is_a( $wc_order, \WC_Order::class ) ) { if ( ! is_a( $wc_order, \WC_Order::class ) ) {
$message = sprintf( $message = sprintf(
// translators: %s is the PayPal refund Id. // translators: %s is the PayPal refund Id.
__( 'Order for PayPal refund %s not found.', 'paypal-payments-for-woocommerce' ), __( 'Order for PayPal refund %s not found.', 'woocommerce-paypal-payments' ),
isset( $request['resource']['id'] ) ? $request['resource']['id'] : '' isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
); );
$this->logger->log( $this->logger->log(
@ -121,7 +121,7 @@ class PaymentCaptureRefunded implements RequestHandler {
'warning', 'warning',
sprintf( sprintf(
// translators: %s is the order id. // translators: %s is the order id.
__( 'Order %s could not be refunded', 'paypal-payments-for-woocommerce' ), __( 'Order %s could not be refunded', 'woocommerce-paypal-payments' ),
(string) $wc_order->get_id() (string) $wc_order->get_id()
), ),
array( array(
@ -140,7 +140,7 @@ class PaymentCaptureRefunded implements RequestHandler {
// translators: %1$s is the order id %2$s is the amount which has been refunded. // translators: %1$s is the order id %2$s is the amount which has been refunded.
__( __(
'Order %1$s has been refunded with %2$s through PayPal', 'Order %1$s has been refunded with %2$s through PayPal',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(string) $wc_order->get_id(), (string) $wc_order->get_id(),
(string) $refund->get_amount() (string) $refund->get_amount()

View file

@ -79,7 +79,7 @@ class PaymentCaptureReversed implements RequestHandler {
// translators: %s is the PayPal webhook Id. // translators: %s is the PayPal webhook Id.
__( __(
'No order for webhook event %s was found.', 'No order for webhook event %s was found.',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
isset( $request['id'] ) ? $request['id'] : '' isset( $request['id'] ) ? $request['id'] : ''
); );
@ -98,7 +98,7 @@ class PaymentCaptureReversed implements RequestHandler {
if ( ! is_a( $wc_order, \WC_Order::class ) ) { if ( ! is_a( $wc_order, \WC_Order::class ) ) {
$message = sprintf( $message = sprintf(
// translators: %s is the PayPal refund Id. // translators: %s is the PayPal refund Id.
__( 'Order for PayPal refund %s not found.', 'paypal-payments-for-woocommerce' ), __( 'Order for PayPal refund %s not found.', 'woocommerce-paypal-payments' ),
isset( $request['resource']['id'] ) ? $request['resource']['id'] : '' isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
); );
$this->logger->log( $this->logger->log(
@ -123,12 +123,12 @@ class PaymentCaptureReversed implements RequestHandler {
// translators: %1$s is the order id. // translators: %1$s is the order id.
__( __(
'Order %1$s has been cancelled through PayPal', 'Order %1$s has been cancelled through PayPal',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
(string) $wc_order->get_id() (string) $wc_order->get_id()
) : sprintf( ) : sprintf(
// translators: %1$s is the order id. // translators: %1$s is the order id.
__( 'Failed to cancel order %1$s through PayPal', 'paypal-payments-for-woocommerce' ), __( 'Failed to cancel order %1$s through PayPal', 'woocommerce-paypal-payments' ),
(string) $wc_order->get_id() (string) $wc_order->get_id()
); );
$this->logger->log( $this->logger->log(

View file

@ -123,7 +123,7 @@ class IncomingWebhookEndpoint {
if ( ! $result ) { if ( ! $result ) {
$this->logger->log( $this->logger->log(
'error', 'error',
__( 'Illegit Webhook request detected.', 'paypal-payments-for-woocommerce' ) __( 'Illegit Webhook request detected.', 'woocommerce-paypal-payments' )
); );
} }
return $result; return $result;
@ -134,7 +134,7 @@ class IncomingWebhookEndpoint {
// translators: %s is the error message. // translators: %s is the error message.
__( __(
'Illegit Webhook request detected: %s', 'Illegit Webhook request detected: %s',
'paypal-payments-for-woocommerce' 'woocommerce-paypal-payments'
), ),
$exception->getMessage() $exception->getMessage()
) )
@ -159,7 +159,7 @@ class IncomingWebhookEndpoint {
'info', 'info',
sprintf( sprintf(
// translators: %s is the event type. // translators: %s is the event type.
__( 'Webhook has been handled by %s', 'paypal-payments-for-woocommerce' ), __( 'Webhook has been handled by %s', 'woocommerce-paypal-payments' ),
( $handler->event_types() ) ? current( $handler->event_types() ) : '' ( $handler->event_types() ) ? current( $handler->event_types() ) : ''
), ),
array( array(
@ -173,7 +173,7 @@ class IncomingWebhookEndpoint {
$message = sprintf( $message = sprintf(
// translators: %s is the request type. // translators: %s is the request type.
__( 'Could not find handler for request type %s', 'paypal-payments-for-woocommerce' ), __( 'Could not find handler for request type %s', 'woocommerce-paypal-payments' ),
$request['event_type'] $request['event_type']
); );
$this->logger->log( $this->logger->log(

View file

@ -16,7 +16,7 @@ use Psr\Log\LoggerInterface;
return array( return array(
'woocommerce.logger.source' => function(): string { 'woocommerce.logger.source' => function(): string {
return 'paypal-payments-for-woocommerce'; return 'woocommerce-paypal-payments';
}, },
'woocommerce.logger.woocommerce' => function ( ContainerInterface $container ): LoggerInterface { 'woocommerce.logger.woocommerce' => function ( ContainerInterface $container ): LoggerInterface {
if ( ! class_exists( \WC_Logger::class ) ) { if ( ! class_exists( \WC_Logger::class ) ) {

View file

@ -11,7 +11,7 @@
<rule ref="WordPress.WP.I18n"> <rule ref="WordPress.WP.I18n">
<properties> <properties>
<property name="text_domain" type="array" value="paypal-payments-for-woocommerce" /> <property name="text_domain" type="array" value="woocommerce-paypal-payments" />
</properties> </properties>
</rule> </rule>

View file

@ -1,13 +1,13 @@
<?php <?php
/** /**
* Plugin Name: PayPal Payments for WooCommerce * Plugin Name: WooCommerce PayPal Payments
* Plugin URI: TODO * Plugin URI: TODO
* Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage. * Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage.
* Version: dev-master * Version: dev-master
* Author: WooCommerce * Author: WooCommerce
* Author URI: https://inpsyde.com/ * Author URI: https://inpsyde.com/
* License: GPL-2.0 * License: GPL-2.0
* Text Domain: paypal-payments-for-woocommerce * Text Domain: woocommerce-paypal-payments
* *
* @package WooCommerce\PayPalCommerce * @package WooCommerce\PayPalCommerce
*/ */