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
run: ./vendor/bin/phpunit
- 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.
@ -11,7 +11,7 @@ PayPal's latest complete payments processing solution. Accept PayPal, PayPal Cre
## Development
1. Clone repository
2. `$ cd paypal-for-woocommerce`
2. `$ cd woocommerce-paypal-payments`
3. `$ composer install`
4. `$ yarn run dev`
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`
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
@ -71,4 +71,4 @@ Fix the PayPal JavaScript SDK integration date by using the current date for the
## 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",
"description": "PayPal Commerce Platform for WooCommerce",
"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 ) {
$error = new RuntimeException(
__( 'Could not create token.', 'paypal-payments-for-woocommerce' )
__( 'Could not create token.', 'woocommerce-paypal-payments' )
);
$this->logger->log(
'warning',

View file

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

View file

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

View file

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

View file

@ -113,7 +113,7 @@ class PartnersEndpoint {
$error = new RuntimeException(
__(
'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 ) ) {
$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(
'warning',
@ -156,7 +156,7 @@ class PaymentsEndpoint {
if ( is_wp_error( $response ) ) {
$error = new RuntimeException(
__( 'Could not capture authorized payment.', 'paypal-payments-for-woocommerce' )
__( 'Could not capture authorized payment.', 'woocommerce-paypal-payments' )
);
$this->logger->log(
'warning',
@ -216,7 +216,7 @@ class PaymentsEndpoint {
if ( is_wp_error( $response ) ) {
$error = new RuntimeException(
__( 'Could not refund payment.', 'paypal-payments-for-woocommerce' )
__( 'Could not refund payment.', 'woocommerce-paypal-payments' )
);
$this->logger->log(
'warning',

View file

@ -105,7 +105,7 @@ class PaymentTokenEndpoint {
$response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) {
$error = new RuntimeException(
__( 'Could not fetch payment token.', 'paypal-payments-for-woocommerce' )
__( 'Could not fetch payment token.', 'woocommerce-paypal-payments' )
);
$this->logger->log(
'warning',
@ -143,7 +143,7 @@ class PaymentTokenEndpoint {
$error = new RuntimeException(
sprintf(
// 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
)
);
@ -185,7 +185,7 @@ class PaymentTokenEndpoint {
if ( is_wp_error( $response ) ) {
$error = new RuntimeException(
__( 'Could not delete payment token.', 'paypal-payments-for-woocommerce' )
__( 'Could not delete payment token.', 'woocommerce-paypal-payments' )
);
$this->logger->log(
'warning',

View file

@ -101,7 +101,7 @@ class WebhookEndpoint {
if ( is_wp_error( $response ) ) {
$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(
'warning',
@ -161,7 +161,7 @@ class WebhookEndpoint {
if ( is_wp_error( $response ) ) {
$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(
'warning',
@ -223,7 +223,7 @@ class WebhookEndpoint {
$response = $this->request( $url, $args );
if ( is_wp_error( $response ) ) {
$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(
'warning',
@ -251,7 +251,7 @@ class WebhookEndpoint {
if ( ! $webhook->id() ) {
$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 ) );
throw $error;
@ -282,7 +282,7 @@ class WebhookEndpoint {
// translators: %s is the headers key.
__(
'Not a valid webhook event. Header %s is missing',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
$key
)

View file

@ -55,7 +55,7 @@ class AuthorizationStatus {
throw new RuntimeException(
sprintf(
// 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
)
);

View file

@ -50,7 +50,7 @@ class OrderStatus {
throw new RuntimeException(
sprintf(
// 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
)
);

View file

@ -52,7 +52,7 @@ class PayerTaxInfo {
throw new RuntimeException(
sprintf(
// 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
)
);

View file

@ -46,7 +46,7 @@ class PaymentToken {
public function __construct( string $id, string $type = self::TYPE_PAYMENT_METHOD_TOKEN ) {
if ( ! in_array( $type, self::VALID_TYPES, true ) ) {
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;

View file

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

View file

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

View file

@ -153,11 +153,11 @@ class AmountFactory {
*/
public function from_paypal_response( \stdClass $data ): Amount {
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 ) ) {
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(
sprintf(
// 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
)
);
@ -209,7 +209,7 @@ class AmountFactory {
throw new RuntimeException(
sprintf(
// 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
)
);

View file

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

View file

@ -194,7 +194,7 @@ class PurchaseUnitFactory {
public function from_paypal_response( \stdClass $data ): PurchaseUnit {
if ( ! isset( $data->reference_id ) || ! is_string( $data->reference_id ) ) {
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().
$full_name = sprintf(
// 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_last_name()
);
@ -82,12 +82,12 @@ class ShippingFactory {
public function from_paypal_response( \stdClass $data ): Shipping {
if ( ! isset( $data->name->full_name ) ) {
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 ) ) {
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 );

View file

@ -60,17 +60,17 @@ class WebhookFactory {
public function from_paypal_response( \stdClass $data ): Webhook {
if ( ! isset( $data->id ) ) {
throw new RuntimeException(
__( 'No id for webhook given.', 'paypal-payments-for-woocommerce' )
__( 'No id for webhook given.', 'woocommerce-paypal-payments' )
);
}
if ( ! isset( $data->url ) ) {
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 ) ) {
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 to your shop.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'show_add_credit_card' => true,
),

View file

@ -88,7 +88,7 @@ return array(
'button.url' => static function ( $container ): string {
return plugins_url(
'/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 {

View file

@ -518,19 +518,19 @@ class SmartButton implements SmartButtonInterface {
>
</div>',
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(
'<div id="%1$s" style="display:none;">
<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>',
esc_attr( $id ),
esc_html__( 'Credit Card number', 'paypal-payments-for-woocommerce' ),
esc_html__( 'Expiration', 'paypal-payments-for-woocommerce' ),
esc_html__( 'CVV', 'paypal-payments-for-woocommerce' ),
esc_html__( 'Credit Card number', 'woocommerce-paypal-payments' ),
esc_html__( 'Expiration', 'woocommerce-paypal-payments' ),
esc_html__( 'CVV', 'woocommerce-paypal-payments' ),
//phpcs:ignore
$save_card,
esc_html( $label )
@ -633,14 +633,14 @@ class SmartButton implements SmartButtonInterface {
'labels' => array(
'credit_card_number' => '',
'cvv' => '',
'mm_yyyy' => __( 'MM/YYYY', 'paypal-payments-for-woocommerce' ),
'mm_yyyy' => __( 'MM/YYYY', 'woocommerce-paypal-payments' ),
'fields_not_valid' => __(
'Unfortunatly, your credit card details are not valid.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'card_not_supported' => __(
'Unfortunatly, we do not support your credit card.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
),
'valid_cards' => $this->dcc_applies->valid_cards(),
@ -650,7 +650,7 @@ class SmartButton implements SmartButtonInterface {
'error' => array(
'generic' => __(
'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() );
if ( ! isset( $data['order_id'] ) ) {
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(
sprintf(
// 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']
)
);
@ -143,7 +143,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException(
__(
'Unfortunately, we do not accept this card.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
100
);
@ -154,7 +154,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException(
__(
'Something went wrong. Please try again.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
)
);
}
@ -162,7 +162,7 @@ class ApproveOrderEndpoint implements EndpointInterface {
throw new RuntimeException(
__(
'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(
sprintf(
// 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']
)
);

View file

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

View file

@ -150,7 +150,7 @@ class CreateOrderEndpoint implements EndpointInterface {
wp_send_json_error(
array(
'name' => 'order-not-found',
'message' => __( 'Order not found', 'paypal-payments-for-woocommerce' ),
'message' => __( 'Order not found', 'woocommerce-paypal-payments' ),
'code' => 0,
'details' => array(),
)
@ -284,7 +284,7 @@ class CreateOrderEndpoint implements EndpointInterface {
$parsed_values = wp_parse_args( $form_values );
if ( ! isset( $parsed_values['terms'] ) ) {
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 );
throw new RuntimeException(
__( 'Could not validate nonce.', 'paypal-payments-for-woocommerce' )
__( 'Could not validate nonce.', 'woocommerce-paypal-payments' )
);
}
$this->dequeue_nonce_fix();

View file

@ -131,7 +131,7 @@ return array(
'onboarding.url' => static function ( $container ): string {
return plugins_url(
'/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 = add_query_arg( $args, $url );
$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(
$url,
$id,
@ -83,7 +83,7 @@ class OnboardingRenderer {
} catch ( RuntimeException $exception ) {
esc_html_e(
'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__(
'You are currently paying with PayPal. If you want to cancel
this process, please click %1$shere%2$s.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'<a href="' . esc_url( $url ) . '">',
'</a>'

View file

@ -94,7 +94,7 @@ class RenewalHandler {
'info',
sprintf(
// 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()
),
array(
@ -111,7 +111,7 @@ class RenewalHandler {
// 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',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
(int) $wc_order->get_id(),
$error->getMessage()
@ -129,7 +129,7 @@ class RenewalHandler {
// translators: %d is the order number.
__(
'Moneytransfer for order %d is completed.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
(int) $wc_order->get_id()
),
@ -183,7 +183,7 @@ class RenewalHandler {
// translators: %d is the customer id.
__(
'No payment token found for customer %d',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
(int) $customer->get_id()
),
@ -208,7 +208,7 @@ class RenewalHandler {
if ( $order->intent() === 'CAPTURE' && $order->status()->is( OrderStatus::COMPLETED ) ) {
$wc_order->update_status(
'processing',
__( 'Payment received.', 'paypal-payments-for-woocommerce' )
__( 'Payment received.', 'woocommerce-paypal-payments' )
);
\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(
array_slice( $columns, 0, $to_insert_position ),
array(
self::COLUMN_KEY => __( 'Payment Captured', 'paypal-payments-for-woocommerce' ),
self::COLUMN_KEY => __( 'Payment Captured', 'woocommerce-paypal-payments' ),
),
array_slice( $columns, $to_insert_position )
);
@ -124,7 +124,7 @@ class OrderTablePaymentStatusColumn {
'<span class="dashicons dashicons-yes">
<span class="screen-reader-text">%s</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() {
printf(
'<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>',
esc_html__(
'Not captured',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
esc_html__(
'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__(
'Capture authorized PayPal payment',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
return $order_actions;
}

View file

@ -103,11 +103,11 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
$this->method_title = __(
'PayPal Card Processing',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
$this->method_description = __(
'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->config->get( 'dcc_gateway_title' ) : $this->method_title;
@ -134,9 +134,9 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
public function init_form_fields() {
$this->form_fields = array(
'enabled' => array(
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ),
'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'label' => __( 'Enable Credit Card Payments', 'paypal-payments-for-woocommerce' ),
'label' => __( 'Enable Credit Card Payments', 'woocommerce-paypal-payments' ),
'default' => 'no',
),
'ppcp' => array(
@ -187,37 +187,37 @@ class CreditCardGateway extends \WC_Payment_Gateway_CC {
'visa' => _x(
'Visa',
'Name of credit card',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'mastercard' => _x(
'Mastercard',
'Name of credit card',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'amex' => _x(
'American Express',
'Name of credit card',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'discover' => _x(
'Discover',
'Name of credit card',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'jcb' => _x(
'JCB',
'Name of credit card',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'elo' => _x(
'Elo',
'Name of credit card',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'hiper' => _x(
'Hiper',
'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() {
$this->form_fields = array(
'enabled' => array(
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ),
'title' => __( 'Enable/Disable', 'woocommerce-paypal-payments' ),
'type' => 'checkbox',
'desc_tip' => true,
'description' => __( 'In order to use PayPal or PayPal Card Processing, you need to enable the Gateway.', 'paypal-payments-for-woocommerce' ),
'label' => __( 'Enable the PayPal 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', 'woocommerce-paypal-payments' ),
'default' => 'no',
),
'ppcp' => array(
@ -204,7 +204,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $is_processed ) {
$wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
__( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
);
$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 ( $wc_order->get_status() === 'on-hold' ) {
$wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
__( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
);
$wc_order->set_status( 'processing' );
}
@ -268,12 +268,12 @@ class PayPalGateway extends \WC_Payment_Gateway {
*/
private function define_method_title(): string {
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() ) {
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() ) {
return __(
'Accept debit and credit cards, and local payment methods with PayPals latest solution.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
}
return __(
'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 ) {
$this->session_handler->destroy_session_data();
wc_add_notice(
__( 'Please use a different payment method.', 'paypal-payments-for-woocommerce' ),
__( 'Please use a different payment method.', 'woocommerce-paypal-payments' ),
'error'
);
return null;

View file

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

View file

@ -58,7 +58,7 @@ class ConnectAdminNotice {
/* translators: %1$s the gateway name. */
__(
'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' )
);

View file

@ -141,13 +141,13 @@ class OrderProcessor {
if ( ! $order || ! $this->order_is_approved( $order ) ) {
$error_message = __(
'The payment has not been approved yet.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
}
if ( $error_message ) {
$this->last_error = sprintf(
// translators: %s is the message of the error.
__( 'Payment error: %s', 'paypal-payments-for-woocommerce' ),
__( 'Payment error: %s', 'woocommerce-paypal-payments' ),
$error_message
);
return false;
@ -165,18 +165,18 @@ class OrderProcessor {
$wc_order->update_status(
'on-hold',
__( 'Awaiting payment.', 'paypal-payments-for-woocommerce' )
__( 'Awaiting payment.', 'woocommerce-paypal-payments' )
);
if ( $order->status()->is( OrderStatus::COMPLETED ) && $order->intent() === 'CAPTURE' ) {
$wc_order->update_status(
'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 ) ) {
$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_status( 'processing' );

View file

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

View file

@ -86,19 +86,19 @@ class Settings implements ContainerInterface {
$this->settings = get_option( self::KEY, array() );
$defaults = array(
'title' => __( 'PayPal', 'paypal-payments-for-woocommerce' ),
'title' => __( 'PayPal', 'woocommerce-paypal-payments' ),
'description' => __(
'Pay via PayPal.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'button_single_product_enabled' => true,
'button_mini-cart_enabled' => true,
'button_cart_enabled' => true,
'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' => __(
'Pay with your credit card.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
);
foreach ( $defaults as $key => $value ) {

View file

@ -111,7 +111,7 @@ class SettingsRenderer {
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.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'error',
false
@ -367,13 +367,13 @@ class SettingsRenderer {
private function render_dcc_not_active_yet() {
?>
<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">
<p>
<?php
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.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
?>
</p>
@ -388,7 +388,7 @@ class SettingsRenderer {
private function render_3d_secure_info() {
?>
<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>
<p>
<?php
@ -405,7 +405,7 @@ class SettingsRenderer {
an additional layer of verification using Verified by Visa,
MasterCard SecureCode and American Express SafeKey.
%1$sLearn more about 3D Secure.%2$s',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
'<a href = "#">',
'</a>'
@ -424,20 +424,20 @@ class SettingsRenderer {
private function render_dcc_onboarding_info() {
?>
<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">
<p>
<?php
esc_html_e(
'You need to complete your onboarding, before you can use the PayPal Card Processing option.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
?>
<a
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>
</p>
</td>
@ -451,13 +451,13 @@ class SettingsRenderer {
private function render_dcc_does_not_apply_info() {
?>
<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">
<p>
<?php
esc_html_e(
'Unfortunatly, the card processing option is not yet available in your country.',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
);
?>
</p>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -123,7 +123,7 @@ class IncomingWebhookEndpoint {
if ( ! $result ) {
$this->logger->log(
'error',
__( 'Illegit Webhook request detected.', 'paypal-payments-for-woocommerce' )
__( 'Illegit Webhook request detected.', 'woocommerce-paypal-payments' )
);
}
return $result;
@ -134,7 +134,7 @@ class IncomingWebhookEndpoint {
// translators: %s is the error message.
__(
'Illegit Webhook request detected: %s',
'paypal-payments-for-woocommerce'
'woocommerce-paypal-payments'
),
$exception->getMessage()
)
@ -159,7 +159,7 @@ class IncomingWebhookEndpoint {
'info',
sprintf(
// 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() ) : ''
),
array(
@ -173,7 +173,7 @@ class IncomingWebhookEndpoint {
$message = sprintf(
// 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']
);
$this->logger->log(

View file

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

View file

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

View file

@ -1,13 +1,13 @@
<?php
/**
* Plugin Name: PayPal Payments for WooCommerce
* Plugin Name: WooCommerce PayPal Payments
* 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.
* Version: dev-master
* Author: WooCommerce
* Author URI: https://inpsyde.com/
* License: GPL-2.0
* Text Domain: paypal-payments-for-woocommerce
* Text Domain: woocommerce-paypal-payments
*
* @package WooCommerce\PayPalCommerce
*/