tier-pricing-table
/
src
/
Addons
/
NonLoggedInUsers
/
Wholesale
/
views
/
frontend
/
application-status.php
application-status.php in Tiered Pricing Table for WooCommerce 8.0.2, at src/Addons/NonLoggedInUsers/Wholesale/views/frontend/application-status.php
| 1 | <?php |
| 2 | /** |
| 3 | * What a customer sees on the registration page once they applied or were approved. |
| 4 | * |
| 5 | * Override it by copying this file to yourtheme/tiered-pricing-table/application-status.php. |
| 6 | * |
| 7 | * @var string $status pending | approved | rejected |
| 8 | * @var string $message |
| 9 | * @var WP_User|null $user |
| 10 | */ |
| 11 | |
| 12 | if ( ! defined( 'WPINC' ) ) { |
| 13 | die; |
| 14 | } |
| 15 | |
| 16 | $icons = array( |
| 17 | 'pending' => '<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>', |
| 18 | 'approved' => '<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="m8 12 3 3 5-6"/></svg>', |
| 19 | 'rejected' => '<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M15 9l-6 6M9 9l6 6"/></svg>', |
| 20 | ); |
| 21 | |
| 22 | $titles = array( |
| 23 | 'pending' => __( 'Application received', 'tier-pricing-table' ), |
| 24 | 'approved' => __( 'Wholesale account active', 'tier-pricing-table' ), |
| 25 | 'rejected' => __( 'Application not approved', 'tier-pricing-table' ), |
| 26 | ); |
| 27 | ?> |
| 28 | <div class="tpt-wholesale tpt-wholesale-status tpt-wholesale-status--<?php echo esc_attr( $status ); ?>"> |
| 29 | <div class="tpt-wholesale-status__icon"><?php echo $icons[ $status ] ?? ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static SVG ?></div> |
| 30 | <div class="tpt-wholesale-status__body"> |
| 31 | <h2 class="tpt-wholesale-status__title"><?php echo esc_html( $titles[ $status ] ?? '' ); ?></h2> |
| 32 | <p><?php echo wp_kses_post( $message ); ?></p> |
| 33 | <?php if ( 'approved' === $status ) : ?> |
| 34 | <p><a class="button" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>"><?php esc_html_e( 'Start shopping', 'tier-pricing-table' ); ?></a></p> |
| 35 | <?php elseif ( $user ) : ?> |
| 36 | <p><a href="<?php echo esc_url( wc_get_page_permalink( 'myaccount' ) ); ?>"><?php esc_html_e( 'Go to my account', 'tier-pricing-table' ); ?></a></p> |
| 37 | <?php endif; ?> |
| 38 | </div> |
| 39 | </div> |
| 40 |