//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Add select field to the checkout page
add_action('woocommerce_before_order_notes', 'wps_add_select_checkout_field');
function wps_add_select_checkout_field( $checkout ) {
echo '<h2>'.__('Next Day Delivery').'</h2>';
woocommerce_form_field( 'daypart', array(
'type' => 'select',
'class' => array( 'wps-drop' ),
'label' => __( 'Delivery options' ),
'options' => array(
'blank' => __( 'Select a day part', 'wps' ),
'morning' => __( 'In the morning', 'wps' ),
'afternoon' => __( 'In the afternoon', 'wps' ),
'evening' => __( 'In the evening', 'wps' )
)
),
$checkout->get_value( 'daypart' ));
}
if( have_rows('logo_top') ): while ( have_rows('logo_top') ) : the_row(); ?>
<a class="navbar-brand sticky_logo" href="<?php if ( is_page( [ 75, 563, 565 ] ) ) {
the_sub_field( 'logo_url' ); }
<div class="container">
<?php if( have_rows('logo_top') ): while ( have_rows('logo_top') ) : the_row(); ?>
<a class="navbar-brand sticky_logo" href="<?php the_sub_field('logo_url'); ?>">
<img class="main" src="<?php the_sub_field('logo_white_img'); ?>" srcset="<?php the_field('logo_white_img'); ?>">
<img class="sticky" src="<?php the_sub_field('logo_black_img'); ?>" srcset="<?php the_sub_field('logo_black_img'); ?>">
</a>
<?php endwhile; endif; ?>
Там вот этот код:
Из этого кода убрал сразу
Т.к. он мне показался бесполезным.
Дальше обратил внимание на этот кусок кода
И заменил на свое, получилось вот так
И так далее, произвел замену по аналогии в других местах.
Но я так и не понял, как быть, если это не кастомные поля, а те самые, которые предлагает сам woocommerce? Откуда брать вот это "$gift_wrap".