block
3 days ago
plain
3 days ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
7 months ago
admin-new-order.php
7 months ago
admin-payment-gateway-enabled.php
3 months ago
customer-abandoned-cart-recovery.php
3 days ago
customer-cancelled-order.php
7 months ago
customer-completed-order.php
7 months ago
customer-failed-order.php
7 months ago
customer-fulfillment-created.php
7 months ago
customer-fulfillment-deleted.php
7 months ago
customer-fulfillment-updated.php
2 months ago
customer-invoice.php
7 months ago
customer-new-account.php
1 month ago
customer-note.php
7 months ago
customer-on-hold-order.php
7 months ago
customer-pos-completed-order.php
7 months ago
customer-pos-refunded-order.php
7 months ago
customer-processing-order.php
7 months ago
customer-refunded-order.php
7 months ago
customer-reset-password.php
1 month ago
customer-review-request.php
2 months ago
customer-stock-notification-verified.php
1 month ago
customer-stock-notification-verify.php
10 months ago
customer-stock-notification.php
10 months ago
customer-verify-email.php
3 days ago
email-addresses.php
4 months ago
email-button.php
3 days ago
email-customer-details.php
1 year ago
email-downloads.php
7 months ago
email-footer.php
7 months ago
email-fulfillment-details.php
3 months ago
email-fulfillment-items.php
3 days ago
email-header.php
3 months ago
email-mobile-messaging.php
2 years ago
email-order-details.php
2 months ago
email-order-items.php
3 days ago
email-styles.php
3 days ago
email-button.php
27 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email call-to-action button. |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-button.php. |
| 6 | * |
| 7 | * @see https://woocommerce.com/document/template-structure/ |
| 8 | * @package WooCommerce\Templates\Emails |
| 9 | * @version 11.0.0 |
| 10 | * |
| 11 | * @var string $url Button destination URL. |
| 12 | * @var string $label Button text. |
| 13 | */ |
| 14 | |
| 15 | defined( 'ABSPATH' ) || exit; |
| 16 | |
| 17 | // Fall back to the default when the option is set but empty (get_option's default only covers a missing option). |
| 18 | $wc_button_bg = get_option( 'woocommerce_email_base_color', '#7f54b3' ); |
| 19 | $wc_button_bg = $wc_button_bg ? $wc_button_bg : '#7f54b3'; |
| 20 | $wc_button_text = wc_hex_is_light( $wc_button_bg ) ? '#000000' : '#ffffff'; |
| 21 | ?> |
| 22 | <p style="margin: 24px 0;"> |
| 23 | <a href="<?php echo esc_url( $url ); ?>" style="display:inline-block;padding:16px 32px;background-color:<?php echo esc_attr( $wc_button_bg ); ?>;color:<?php echo esc_attr( $wc_button_text ); ?>;border-radius:4px;font-weight:bold;font-size:15px;text-decoration:none;"> |
| 24 | <?php echo esc_html( $label ); ?> |
| 25 | </a> |
| 26 | </p> |
| 27 |