Skip to content

Commit

Permalink
Update meta-box-subscription-info.php
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jun 4, 2024
1 parent ca1f781 commit 9a9a6de
Showing 1 changed file with 21 additions and 47 deletions.
68 changes: 21 additions & 47 deletions views/meta-box-subscription-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,22 +310,12 @@ function pronamic_pay_action_links() {

<style>
.pronamic-pay-action-link {
display: flex;

flex-direction: column;

gap: 5px;
}

.pronamic-pay-action-link-tool {
align-items: center;

display: flex;

flex-direction: row;

justify-content: flex-start;

gap: 5px;
}

Expand All @@ -344,104 +334,88 @@ function pronamic_pay_action_links() {
.pronamic-pay-action-link-clipboard .success {
color: #007017;
}

.pronamic-pay-description {
color: #646970;
}
</style>
</th>
<td>
<div class="pronamic-pay-action-link">
<div>
<strong><?php esc_html_e( 'Cancel link', 'pronamic_ideal' ); ?></strong>
</div>

<div>
<?php

$url = $subscription->get_cancel_url();

printf(
\printf(
'<a class="pronamic-pay-action-link-anchor" href="%s">%s</a>',
esc_attr( $url ),
esc_html( $url )
\esc_attr( $url ),
\esc_html__( 'Customer subscription cancel page →', 'pronamic_ideal' )
);

?>
</div>

<div>
<span class="dashicons dashicons-editor-help pronamic-pay-tip" title="<?php echo \esc_attr__( 'This page can be shared with the customer and gives the customer the option to cancel this subscription.', 'pronamic_ideal' ); ?>" tabindex="0"></span>
</div>

<div class="pronamic-pay-action-link-clipboard">
<button type="button" class="button button-small pronamic-pay-copy-url" data-clipboard-text="<?php echo \esc_url( $url ); ?>"><?php \esc_html_e( 'Copy URL to clipboard', 'pronamic_ideal' ); ?></button>
<span class="success hidden" aria-hidden="true"><?php \esc_html_e( 'Copied!', 'pronamic_ideal' ); ?></span>
</div>

<div class="pronamic-pay-description">
<?php \esc_html_e( 'This link can be shared with the customer and gives the customer the option to cancel this subscription.', 'pronamic_ideal' ); ?>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="pronamic-pay-action-link">
<div>
<strong><?php esc_html_e( 'Renewal link', 'pronamic_ideal' ); ?></strong>
</div>

<div>
<?php

$url = $subscription->get_renewal_url();

printf(
\printf(
'<a class="pronamic-pay-action-link-anchor" href="%s">%s</a>',
esc_attr( $url ),
esc_html( $url )
\esc_attr( $url ),
\esc_html__( 'Customer subscription renew page →', 'pronamic_ideal' )
);

?>
</div>

<div>
<span class="dashicons dashicons-editor-help pronamic-pay-tip" title="<?php echo \esc_attr__( 'This page can be shared with the customer and gives the customer the option to (early) renew the subscription.', 'pronamic_ideal' ); ?>" tabindex="0"></span>
</div>

<div class="pronamic-pay-action-link-clipboard">
<button type="button" class="button button-small pronamic-pay-copy-url" data-clipboard-text="<?php echo \esc_url( $url ); ?>"><?php \esc_html_e( 'Copy URL to clipboard', 'pronamic_ideal' ); ?></button>
<span class="success hidden" aria-hidden="true"><?php \esc_html_e( 'Copied!', 'pronamic_ideal' ); ?></span>
</div>

<div class="pronamic-pay-description">
<?php \esc_html_e( 'This link can be shared with the customer and gives the customer the option to (early) renew the subscription.', 'pronamic_ideal' ); ?>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="pronamic-pay-action-link">
<div>
<strong><?php esc_html_e( 'Change payment method link', 'pronamic_ideal' ); ?></strong>
</div>

<div>
<?php

$url = $subscription->get_mandate_selection_url();

printf(
\printf(
'<a class="pronamic-pay-action-link-anchor" href="%s">%s</a>',
esc_attr( $url ),
esc_html( $url )
\esc_attr( $url ),
\esc_html__( 'Customer change payment method page →', 'pronamic_ideal' )
);

?>
</div>

<div>
<span class="dashicons dashicons-editor-help pronamic-pay-tip" title="<?php echo \esc_attr__( 'This link can be shared with the customer and gives the customer the opportunity to change the payment method. This is useful if a credit card expires or if a customer wants to have the charge debited from another account.', 'pronamic_ideal' ); ?>" tabindex="0"></span>
</div>

<div class="pronamic-pay-action-link-clipboard">
<button type="button" class="button button-small pronamic-pay-copy-url" data-clipboard-text="<?php echo \esc_url( $url ); ?>"><?php \esc_html_e( 'Copy URL to clipboard', 'pronamic_ideal' ); ?></button>
<span class="success hidden" aria-hidden="true"><?php \esc_html_e( 'Copied!', 'pronamic_ideal' ); ?></span>
</div>

<div class="pronamic-pay-description">
<?php \esc_html_e( 'This link can be shared with the customer and gives the customer the opportunity to change the payment method. This is useful if a credit card expires or if a customer wants to have the charge debited from another account.', 'pronamic_ideal' ); ?>
</div>
</div>
</td>
</tr>
Expand Down

0 comments on commit 9a9a6de

Please sign in to comment.