HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/dinamo-shop/wp-content/themes/dinamo-shop/woocommerce/checkout/terms.php
<?php
/**
 * Checkout terms and conditions area.
 *
 * @package WooCommerce/Templates
 * @version 3.4.0
 */

defined( 'ABSPATH' ) || exit;

if ( apply_filters( 'woocommerce_checkout_show_terms', true ) && function_exists( 'wc_terms_and_conditions_checkbox_enabled' ) ) {
	do_action( 'woocommerce_checkout_before_terms_and_conditions' );

	$user = wp_get_current_user();
	$subscription = get_user_meta($user->ID, 'subscribed_to_newsletter', true);

	?>
	<div class="woocommerce-terms-and-conditions-wrapper">
		<?php
		/**
		 * Terms and conditions hook used to inject content.
		 *
		 * @since 3.4.0.
		 * @hooked wc_checkout_privacy_policy_text() Shows custom privacy policy text. Priority 20.
		 * @hooked wc_terms_and_conditions_page_content() Shows t&c page content. Priority 30.
		 */
		do_action( 'woocommerce_checkout_terms_and_conditions' );
		?>

		<div class="py-30">
			<?php if ( wc_terms_and_conditions_checkbox_enabled() ) : ?>
			<div class="form-group">
				<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
					<span class="woocommerce-terms-and-conditions-checkbox-text"><?php wc_terms_and_conditions_checkbox_text(); ?></span>&nbsp;<span class="required">*</span>
					<input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="terms" <?php checked( apply_filters( 'woocommerce_terms_is_checked_default', isset( $_POST['terms'] ) ), true ); // WPCS: input var ok, csrf ok. ?> id="terms" />
					<span class="checkmark"></span>
				</label>
				<input type="hidden" name="terms-field" value="1" />
			</div>
			<?php endif; ?>

			<div class="form-group">
				<label for="newsletter" class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">
					<span class="woocommerce-terms-and-conditions-checkbox-text"><?php _e( 'Želim primati obavijesti o novim akcijama i promocijama putem emaila.', 'dinamo_shop' ); ?>
					<input type="checkbox" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" name="newsletter" id="newsletter" <?= $subscription == 'yes' ? 'checked="chedked"' : '' ?>/>
					<span class="checkmark"></span>
				</label>
			</div>
		</div>

	</div>
	<?php

	do_action( 'woocommerce_checkout_after_terms_and_conditions' );
}