ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

terms.php (1944B)


      1 <?php
      2 /**
      3  * Checkout terms and conditions area.
      4  *
      5  * @package WooCommerce\Templates
      6  * @version 3.4.0
      7  */
      8 
      9 defined( 'ABSPATH' ) || exit;
     10 
     11 if ( apply_filters( 'woocommerce_checkout_show_terms', true ) && function_exists( 'wc_terms_and_conditions_checkbox_enabled' ) ) {
     12 	do_action( 'woocommerce_checkout_before_terms_and_conditions' );
     13 
     14 	?>
     15 	<div class="woocommerce-terms-and-conditions-wrapper">
     16 		<?php
     17 		/**
     18 		 * Terms and conditions hook used to inject content.
     19 		 *
     20 		 * @since 3.4.0.
     21 		 * @hooked wc_checkout_privacy_policy_text() Shows custom privacy policy text. Priority 20.
     22 		 * @hooked wc_terms_and_conditions_page_content() Shows t&c page content. Priority 30.
     23 		 */
     24 		do_action( 'woocommerce_checkout_terms_and_conditions' );
     25 		?>
     26 
     27 		<?php if ( wc_terms_and_conditions_checkbox_enabled() ) : ?>
     28 			<p class="form-row validate-required">
     29 
     30         <div class="mdc-form-field">
     31           <div class="mdc-checkbox">
     32             <input type="checkbox"
     33                    class="mdc-checkbox__native-control"
     34                    <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true );  // WPCS: input var ok, csrf ok. ?>
     35                    id="terms"
     36                    name="terms"/>
     37             <div class="mdc-checkbox__background">
     38               <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
     39                 <path class="mdc-checkbox__checkmark-path" fill="none" stroke="white" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
     40               </svg>
     41               <div class="mdc-checkbox__mixedmark"></div>
     42             </div>
     43           </div>
     44           <label for="terms" class="checkbox woocommerce-terms-and-conditions-checkbox-text"><?php wc_terms_and_conditions_checkbox_text(); ?></label>
     45           <input type="hidden" name="terms-field" value="1" />
     46         </div>
     47 
     48 			</p>
     49 		<?php endif; ?>
     50 	</div>
     51 	<?php
     52 
     53 	do_action( 'woocommerce_checkout_after_terms_and_conditions' );
     54 }