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

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>