| Server IP : 159.253.20.91 / Your IP : 216.73.216.111 Web Server : nginx/1.20.2 System : Linux se38c9e53.fastvps-server.com 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 User : pr11_ru_usr ( 1041) PHP Version : 8.1.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/pr11_ru_usr/data/www/pr11.ru/wp-content/themes/norebro/ |
Upload File : |
<?php
//require_once get_template_directory() . '/inc/demo_debug.php'; // demo debug
// Init
require_once get_template_directory() . '/inc/init/theme.php'; // theme init
require_once get_template_directory() . '/inc/init/customizer.php'; // customizer
require_once get_template_directory() . '/inc/init/custom-header.php'; // custom header feature
require_once get_template_directory() . '/inc/init/extras.php'; // extras
// Norebro helper framework
require_once get_template_directory() . '/inc/framework/bootstrap.php'; // Norebro framework
// Include TGMPA and set up plugins
require_once get_template_directory() . '/inc/tgmpa/class-tgm-plugin-activation.php';
require_once get_template_directory() . '/inc/tgmpa/register_plugins.php';
require_once get_template_directory() . '/inc/tgmpa/vc_setup.php';
require_once get_template_directory() . '/inc/tgmpa/acf_setup.php';
require_once get_template_directory() . '/inc/tgmpa/woocommerce_setup.php';
require_once get_template_directory() . '/inc/tgmpa/ocdi_setup.php';
// Parts
require_once get_template_directory() . '/inc/template-tags.php'; // custom tags template
require_once get_template_directory() . '/inc/sidebars.php'; // sidebars register
require_once get_template_directory() . '/inc/menu.php'; // mega menu
require_once get_template_directory() . '/inc/wp_overrides.php'; // WP features overrides (posts, comments, auth, ...)
// CSS and JS includes
require_once get_template_directory() . '/inc/enqueue.php';
function custom_override_checkout_fields( $fields ) {
//unset($fields['billing']['billing_first_name']);// имя
//unset($fields['billing']['billing_last_name']);// фамилия
unset($fields['billing']['billing_company']); // компания
//unset($fields['billing']['billing_address_1']);//
//unset($fields['billing']['billing_address_2']);//
//unset($fields['billing']['billing_city']);
//unset($fields['billing']['billing_postcode']);
//unset($fields['billing']['billing_country']);
//unset($fields['billing']['billing_state']);
//unset($fields['order']['order_comments']);
//unset($fields['billing']['billing_email']);
//unset($fields['account']['account_username']);
//unset($fields['account']['account_password']);
//unset($fields['account']['account_password-2']);
$fields['billing']['billing_phone']['placeholder'] = '*Телефон';
$fields['billing']['billing_email']['placeholder'] = 'E-Mail';
unset($fields['billing']['billing_company']);// компания
unset($fields['billing']['billing_postcode']);// индекс
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_last_name']);
//unset($fields['billing']['billing_email']);
return $fields;
}
add_filter('woocommerce_default_address_fields', 'override_default_address_checkout_fields', 20, 1);
function override_default_address_checkout_fields( $address_fields ) {
$address_fields['first_name']['placeholder'] = '*Ваше Имя';
$address_fields['address_1']['placeholder'] = '*Ваш адрес';
$address_fields['address_2']['placeholder'] = '*Кв./Офис';
$address_fields['city']['placeholder'] = 'Город';
return $address_fields;
}
//убираем значения методов
add_filter('woocommerce_cart_shipping_method_full_label', 'remove_shipping_label', 10, 2);
function remove_shipping_label($label, $method) {
$new_label = preg_replace('/^.+:/', '', $label);
return $new_label;
}