PluginProbe
Additional Terms Lite for WooCommerce / 1.6.3
Additional Terms Lite for WooCommerce v1.6.3
1.7.3 1.7.2.1 trunk 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.6.3 All 35 releases
woo-additional-terms / templates / order / terms-acceptance.php

terms-acceptance.php in Additional Terms Lite for WooCommerce 1.6.3, at templates/order/terms-acceptance.php

38 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Template for displaying terms acceptance status.
4 *
5 * @since 1.0.0
6 *
7 * @package woo-additional-terms
8 */
9
10 defined( 'ABSPATH' ) || exit;
11 defined( 'WC_VERSION' ) || exit;
12
13 // Bailout, if no value found.
14 if ( empty( $args['meta'] ) ) {
15 return;
16 }
17
18 // This block is intended for ensuring backward compatibility with versions older than 1.6.0.
19 // It's worth noting that in previous versions, the acceptance value was stored within an array.
20 if ( is_array( $args['meta'] ) ) {
21 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
22 $args['meta'] = 'yes';
23 }
24 ?>
25
26 <?php /* incorrect CSS class added here, so it adopts styling we want. */ ?>
27 <div class="address">
28 <p>
29 <strong style="display:flex;gap:5px;">
30 <?php esc_html_e( 'Additional terms and conditions:', 'woo-additional-terms' ); ?>
31 <span class="status-<?php echo esc_attr( wc_string_to_bool( $args['meta'] ) ? 'enabled' : 'disabled' ); ?>"></span>
32 </strong>
33 </p>
34 </div>
35
36 <?php
37 /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
38