mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add tooltips
This commit is contained in:
parent
8b3d23ea01
commit
9f8f9702cb
1 changed files with 25 additions and 7 deletions
|
@ -72,20 +72,24 @@ class OnboardingOptionsRenderer {
|
|||
$this->render_table_row(
|
||||
__( 'Seller Protection', 'woocommerce-paypal-payments' ),
|
||||
__( 'Yes', 'woocommerce-paypal-payments' ),
|
||||
__( 'No matter what you sell, Seller Protection can help you avoid chargebacks, reversals, and fees on eligible PayPal payment transactions — even when a customer has filed a dispute.', 'woocommerce-paypal-payments' ),
|
||||
__( 'On eligible PayPal transactions', 'woocommerce-paypal-payments' )
|
||||
),
|
||||
$this->render_table_row(
|
||||
__( 'Advanced Fraud Protection', 'woocommerce-paypal-payments' ),
|
||||
__( 'Yes', 'woocommerce-paypal-payments' )
|
||||
__( 'Yes', 'woocommerce-paypal-payments' ),
|
||||
__( 'Included with Advanced Checkout at no extra cost, Fraud Protection gives you the insight and control you need to better balance chargebacks and declines.', 'woocommerce-paypal-payments' )
|
||||
),
|
||||
$this->render_table_row(
|
||||
__( 'Chargeback Protection', 'woocommerce-paypal-payments' ),
|
||||
__( 'Yes', 'woocommerce-paypal-payments' ),
|
||||
__( 'If you choose this optional, fee-based alternative to Fraud Protection, PayPal will manage chargebacks for eligible credit and debit card transactions — so you won’t have to worry about unexpected costs.', 'woocommerce-paypal-payments' ),
|
||||
__( 'Extra 0.4% per transaction', 'woocommerce-paypal-payments' )
|
||||
),
|
||||
$this->render_table_row(
|
||||
__( 'Additional Vetting and Underwriting Required', 'woocommerce-paypal-payments' ),
|
||||
__( 'Yes', 'woocommerce-paypal-payments' )
|
||||
__( 'Yes', 'woocommerce-paypal-payments' ),
|
||||
__( 'Business Ownership and other business information will be required during the application for Advanced Card Processing.', 'woocommerce-paypal-payments' )
|
||||
),
|
||||
$this->render_table_row(
|
||||
__( 'Seller Account Type', 'woocommerce-paypal-payments' ),
|
||||
|
@ -94,7 +98,10 @@ class OnboardingOptionsRenderer {
|
|||
);
|
||||
$items[] = '
|
||||
<li>
|
||||
<label><input type="radio" id="ppcp-onboarding-dcc-acdc" name="ppcp_onboarding_dcc" value="acdc" checked ' .
|
||||
<label' .
|
||||
' title="' . __( 'PayPal acts as the payment processor for card transactions. You can add optional features like Chargeback Protection for more security.', 'woocommerce-paypal-payments' ) . '"'
|
||||
. '>
|
||||
<input type="radio" id="ppcp-onboarding-dcc-acdc" name="ppcp_onboarding_dcc" value="acdc" checked ' .
|
||||
'data-screen-url="' . $this->get_screen_url( 'acdc' ) . '"> ' .
|
||||
__( 'Advanced Card Processing', 'woocommerce-paypal-payments' ) . '
|
||||
</label>
|
||||
|
@ -116,16 +123,21 @@ class OnboardingOptionsRenderer {
|
|||
$this->render_table_row(
|
||||
__( 'Seller Protection', 'woocommerce-paypal-payments' ),
|
||||
__( 'Yes', 'woocommerce-paypal-payments' ),
|
||||
__( 'No matter what you sell, Seller Protection can help you avoid chargebacks, reversals, and fees on eligible PayPal payment transactions — even when a customer has filed a dispute.', 'woocommerce-paypal-payments' ),
|
||||
__( 'On eligible PayPal transactions', 'woocommerce-paypal-payments' )
|
||||
),
|
||||
$this->render_table_row(
|
||||
__( 'Seller Account Type', 'woocommerce-paypal-payments' ),
|
||||
__( 'Business or Personal', 'woocommerce-paypal-payments' )
|
||||
__( 'Business or Personal', 'woocommerce-paypal-payments' ),
|
||||
__( 'For Standard payments, Casual sellers may connect their Personal PayPal account in eligible countries to sell on WooCommerce. For Advanced payments, a Business PayPal account is required.', 'woocommerce-paypal-payments' )
|
||||
),
|
||||
);
|
||||
$items[] = '
|
||||
<li ' . ( ! $is_shop_supports_dcc ? 'style="display: none;"' : '' ) . '>
|
||||
<label><input type="radio" id="ppcp-onboarding-dcc-basic" name="ppcp_onboarding_dcc" value="basic" ' .
|
||||
<label ' .
|
||||
' title="' . __( 'Card transactions are managed by PayPal, which simplifies compliance requirements for you.', 'woocommerce-paypal-payments' ) . '"'
|
||||
. '>
|
||||
<input type="radio" id="ppcp-onboarding-dcc-basic" name="ppcp_onboarding_dcc" value="basic" ' .
|
||||
( ! $is_shop_supports_dcc ? 'checked' : '' ) .
|
||||
' data-screen-url="' . $this->get_screen_url( 'basic' ) . '"' .
|
||||
'> ' .
|
||||
|
@ -153,17 +165,23 @@ class OnboardingOptionsRenderer {
|
|||
*
|
||||
* @param string $header The text in the first cell.
|
||||
* @param string $value The text in the second cell.
|
||||
* @param string $tooltip The text shown on hover.
|
||||
* @param string $note The additional description text, such as about conditions.
|
||||
* @return string
|
||||
*/
|
||||
private function render_table_row( string $header, string $value, string $note = '' ): string {
|
||||
private function render_table_row( string $header, string $value, string $tooltip = '', string $note = '' ): string {
|
||||
$value_html = $value;
|
||||
if ( $note ) {
|
||||
$value_html .= '<br/><span class="ppcp-muted-text">' . $note . '</span>';
|
||||
}
|
||||
|
||||
$row_attributes_html = '';
|
||||
if ( $tooltip ) {
|
||||
$row_attributes_html .= 'title="' . $tooltip . '"';
|
||||
}
|
||||
|
||||
return "
|
||||
<tr>
|
||||
<tr $row_attributes_html>
|
||||
<td>$header</td>
|
||||
<td>$value_html</td>
|
||||
</tr>";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue