PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.2 7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 All 91 releases
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

40 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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