rename plugin and slug to PayPal Payments for WooCommerce

This commit is contained in:
David Remer 2020-09-11 10:20:12 +03:00
parent 806c211e35
commit 5e011b4f95
54 changed files with 470 additions and 470 deletions

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-for-woocommerce' ),
self::COLUMN_KEY => __( 'Payment Captured', 'paypal-payments-for-woocommerce' ),
),
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-for-woocommerce' )
esc_html__( 'Payment captured', 'paypal-payments-for-woocommerce' )
);
}
@ -134,7 +134,7 @@ class OrderTablePaymentStatusColumn {
private function render_incomplete_status() {
printf(
'<mark class="onbackorder">%s</mark>',
esc_html__( 'Not captured', 'paypal-for-woocommerce' )
esc_html__( 'Not captured', 'paypal-payments-for-woocommerce' )
);
}
}

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-for-woocommerce'
'paypal-payments-for-woocommerce'
),
esc_html__(
'To capture the payment select capture action from the list below.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
)
);
}

View file

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

View file

@ -152,11 +152,11 @@ class PayPalGateway extends \WC_Payment_Gateway {
public function init_form_fields() {
$this->form_fields = array(
'enabled' => array(
'title' => __( 'Enable/Disable', 'paypal-for-woocommerce' ),
'title' => __( 'Enable/Disable', 'paypal-payments-for-woocommerce' ),
'type' => 'checkbox',
'desc_tip' => true,
'description' => __( 'In order to use PayPal or PayPal Card Processing, you need to enable the Gateway.', 'paypal-for-woocommerce' ),
'label' => __( 'Enable the PayPal Gateway', 'paypal-for-woocommerce' ),
'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' ),
'default' => 'no',
),
'ppcp' => array(
@ -212,7 +212,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $this->session_handler->insufficient_funding_tries() >= 3 ) {
$this->session_handler->destroy_session_data();
wc_add_notice(
__( 'Please use a different payment method.', 'paypal-for-woocommerce' ),
__( 'Please use a different payment method.', 'paypal-payments-for-woocommerce' ),
'error'
);
return null;
@ -246,7 +246,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
if ( $is_processed ) {
$wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-for-woocommerce' )
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
);
$wc_order->set_status( 'processing' );
@ -258,7 +258,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-for-woocommerce' )
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
);
$wc_order->set_status( 'processing' );
}
@ -310,12 +310,12 @@ class PayPalGateway extends \WC_Payment_Gateway {
*/
private function define_method_title(): string {
if ( $this->is_credit_card_tab() ) {
return __( 'PayPal Card Processing', 'paypal-for-woocommerce' );
return __( 'PayPal Card Processing', 'paypal-payments-for-woocommerce' );
}
if ( $this->is_paypal_tab() ) {
return __( 'PayPal Checkout', 'paypal-for-woocommerce' );
return __( 'PayPal Checkout', 'paypal-payments-for-woocommerce' );
}
return __( 'PayPal', 'paypal-for-woocommerce' );
return __( 'PayPal', 'paypal-payments-for-woocommerce' );
}
/**
@ -327,13 +327,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-for-woocommerce'
'paypal-payments-for-woocommerce'
);
}
return __(
'Accept PayPal, PayPal Credit and alternative payment types with PayPals latest solution.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
);
}

View file

@ -48,35 +48,35 @@ class AuthorizeOrderActionNotice {
$messages[ self::NO_INFO ] = array(
'message' => __(
'Could not retrieve information. Try again later.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
),
'type' => 'error',
);
$messages[ self::ALREADY_CAPTURED ] = array(
'message' => __(
'Payment already captured.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
),
'type' => 'error',
);
$messages[ self::FAILED ] = array(
'message' => __(
'Failed to capture. Try again later.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
),
'type' => 'error',
);
$messages[ self::NOT_FOUND ] = array(
'message' => __(
'Could not find payment to process.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
),
'type' => 'error',
);
$messages[ self::SUCCESS ] = array(
'message' => __(
'Payment successfully captured.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
),
'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-for-woocommerce'
'paypal-payments-for-woocommerce'
),
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-for-woocommerce'
'paypal-payments-for-woocommerce'
);
}
if ( $error_message ) {
$this->last_error = sprintf(
// translators: %s is the message of the error.
__( 'Payment error: %s', 'paypal-for-woocommerce' ),
__( 'Payment error: %s', 'paypal-payments-for-woocommerce' ),
$error_message
);
return false;
@ -165,18 +165,18 @@ class OrderProcessor {
$wc_order->update_status(
'on-hold',
__( 'Awaiting payment.', 'paypal-for-woocommerce' )
__( 'Awaiting payment.', 'paypal-payments-for-woocommerce' )
);
if ( $order->status()->is( OrderStatus::COMPLETED ) && $order->intent() === 'CAPTURE' ) {
$wc_order->update_status(
'processing',
__( 'Payment received.', 'paypal-for-woocommerce' )
__( 'Payment received.', 'paypal-payments-for-woocommerce' )
);
}
if ( $this->capture_authorized_downloads( $order ) && $this->authorized_payments_processor->process( $wc_order ) ) {
$wc_order->add_order_note(
__( 'Payment successfully captured.', 'paypal-for-woocommerce' )
__( 'Payment successfully captured.', 'paypal-payments-for-woocommerce' )
);
$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-for-woocommerce' ),
CreditCardGateway::ID => __( 'PayPal Card Processing', 'paypal-for-woocommerce' ),
PayPalGateway::ID => __( 'PayPal Checkout', 'paypal-payments-for-woocommerce' ),
CreditCardGateway::ID => __( 'PayPal Card Processing', 'paypal-payments-for-woocommerce' ),
);
echo '<ul class="subsubsub">';

View file

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

View file

@ -316,7 +316,7 @@ class SettingsRenderer {
private function render_3d_secure_info() {
?>
<tr>
<th><?php esc_html_e( '3D Secure', 'paypal-for-woocommerce' ); ?></th>
<th><?php esc_html_e( '3D Secure', 'paypal-payments-for-woocommerce' ); ?></th>
<td>
<p>
<?php
@ -333,7 +333,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-for-woocommerce'
'paypal-payments-for-woocommerce'
),
'<a href = "#">',
'</a>'
@ -352,20 +352,20 @@ class SettingsRenderer {
private function render_dcc_onboarding_info() {
?>
<tr>
<th><?php esc_html_e( 'Onboarding', 'paypal-for-woocommerce' ); ?></th>
<th><?php esc_html_e( 'Onboarding', 'paypal-payments-for-woocommerce' ); ?></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-for-woocommerce'
'paypal-payments-for-woocommerce'
);
?>
<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-for-woocommerce' ); ?>
<?php esc_html_e( 'Click here to complete your onboarding.', 'paypal-payments-for-woocommerce' ); ?>
</a>
</p>
</td>
@ -379,13 +379,13 @@ class SettingsRenderer {
private function render_dcc_does_not_apply_info() {
?>
<tr>
<th><?php esc_html_e( 'Card Processing not available', 'paypal-for-woocommerce' ); ?></th>
<th><?php esc_html_e( 'Card Processing not available', 'paypal-payments-for-woocommerce' ); ?></th>
<td class="notice notice-error">
<p>
<?php
esc_html_e(
'Unfortunatly, the card processing option is not yet available in your country.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
);
?>
@ -397,7 +397,7 @@ class SettingsRenderer {
<?php
esc_html_e(
'Click here to see, in which countries this option is currently available.',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
);
?>
</a>

View file

@ -241,7 +241,7 @@ class WcGatewayModule implements ModuleInterface {
static function ( $order_actions ): array {
$order_actions['ppcp_authorize_order'] = __(
'Capture authorized PayPal payment',
'paypal-for-woocommerce'
'paypal-payments-for-woocommerce'
);
return $order_actions;
}