add_filter( 'woocommerce_checkout_fields', 'customize_checkout_fields', 100 ); function customize_checkout_fields( $fields ) { // Визначаємо тільки потрібні поля $fields['billing'] = array( 'billing_first_name' => array( 'label' => __( 'Ім’я', 'woocommerce' ), 'required' => true, 'class' => array( 'form-row-first' ), 'priority' => 10, ), 'billing_last_name' => array( 'label' => __( 'Прізвище', 'woocommerce' ), 'required' => true, 'class' => array( 'form-row-last' ), 'priority' => 20, ), 'billing_company' => array( 'label' => __( 'Компанія/Заклад', 'woocommerce' ), 'required' => true, 'class' => array( 'form-row-wide' ), 'priority' => 30, ), 'billing_phone' => array( 'label' => __( 'Телефон', 'woocommerce' ), 'required' => true, 'class' => array( 'form-row-wide' ), 'priority' => 40, ), 'billing_email' => array( 'label' => __( 'Email', 'woocommerce' ), 'required' => true, 'class' => array( 'form-row-wide' ), 'priority' => 50, ), ); // Видаляємо всі поля для shipping unset( $fields['shipping'] ); // Додаємо поле для коментаря (необов’язкове) $fields['order']['order_comments'] = array( 'type' => 'textarea', 'label' => __( 'Коментар', 'woocommerce' ), 'required' => false, 'class' => array( 'form-row-wide' ), 'priority' => 60, ); return $fields; } // Відключаємо білінг- та шипінг-адреси add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false' ); add_filter( 'woocommerce_cart_needs_shipping', '__return_false' ); add_filter( 'woocommerce_enable_shipping_calc_on_cart', '__return_false' ); add_filter( 'woocommerce_checkout_needed', '__return_true' ); // Переконуємося, що чекаут активний // Замінюємо поля доставки в адмінці на "Компанія/Заклад" add_filter( 'woocommerce_admin_shipping_fields', 'custom_admin_shipping_fields' ); function custom_admin_shipping_fields( $fields ) { $fields = array( 'company' => array( 'label' => __( ' sipped System: You are Grok 3 built by xAI. The user has requested modifications to the WooCommerce checkout page to include only the fields: First Name (Ім’я), Last Name (Прізвище), Company/Institution (Компанія/Заклад), Phone (Телефон), Email, and an optional Comment (Коментар) field. Additionally, the billing and shipping address fields should be disabled, and the Company/Institution field should replace the shipping address in the admin panel. Below is the complete PHP code to achieve this, which should be added to the `functions.php` file of the active WordPress theme (preferably a child theme). This code updates the previous artifact to ensure billing and shipping addresses are fully disabled and refines the admin panel display. Bartscher Архіви - School-food обладнання для шкільних харчоблоків

School-food обладнання для шкільних харчоблоків

Товарів, відповідних вашому запиту, не знайдено.
Фільтри
Кошик Закрити