Site icon Hip-Hop Website Design and Development

data-value for customized woocommerce subject exhibiting in code however not visable on web page load

I’ve the code beneath (not written on my own) which has a li data-value populated – nonetheless this isn’t exhibiting subsequent to the date on the product web page, the date is exhibiting appropriately however the location doesn’t seem when you choose the dropdown.

It is a fairly a bit above my information and there’s a lot of code within the capabilities php file which I don’t perceive, so I used to be questioning if there was something apparent?

An instance web page utilizing this code is right here

<div class="custom-meta-field">
    <div class="input-group">                                            
    <enter sort="hidden" id="datebox" class="form-control">
    <enter sort="hidden" id="locationbox" class="form-control">
    <div class="input-group-btn open">
        <button sort="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
            Choose Reserving Date
            <span class="fa fa-caret-down"></span>
        </button>
        <ul id="demolist" class="dropdown-menu">
                        <li data-value="Norwich, Norfolk" type="
    width: 100%;
"><a href="#">Sunday, 09 January 2022</a></li>
                        <li data-value="Leicester"><a href="#">Friday, 29 October 2021</a></li>
                    </ul>
    </div>
    </div>
    </div>

The code from the capabilities php is beneath. I can see the place that is being generated however I have no idea tips on how to painting the placement on to the web page so it’s seen.

operate custom_meta_option() {

    $_date1 = get_post_meta(get_the_ID(),'_date1', true);
    $_date2 = get_post_meta(get_the_ID(),'_date2', true);
    $_date3 = get_post_meta(get_the_ID(),'_date3', true);
    
    $_location1 = get_post_meta(get_the_ID(),'_location1', true);
    $_location2 = get_post_meta(get_the_ID(),'_location2', true);
    $_location3 = get_post_meta(get_the_ID(),'_location3', true);
    
    $product_id = get_the_ID();
    $standing = get_post_meta( $product_id, '_stock_status', true );
    
    /*$phrases = get_the_terms ( $product_id, 'product_cat' );
    foreach ( $phrases as $time period ) {
         echo $cat_id = $term->term_id;
    }*/

    if($standing == 'instock' && !empty($_date1) || !empty($_date2) || !empty($_date3))
    {
    ?>    
    <div class="custom-meta-field">
    <div class="input-group">                                            
    <enter sort="hidden" ID="datebox" Class="form-control"></enter>
    <enter sort="hidden" ID="locationbox" Class="form-control"></enter>
    <div class="input-group-btn">
        <button sort="button" class="btn dropdown-toggle" data-toggle="dropdown">
            Choose Reserving Date
            <span class="fa fa-caret-down"></span>
        </button>
        <ul id="demolist" class="dropdown-menu">
            <?php if($_date1): ?>
            <li data-value="<?php echo $_location1; ?>"><a href="#"><?php echo $_date1; ?></a></li>
            <?php endif; if($_date2):?>
            <li data-value="<?php echo $_location2; ?>"><a href="#"><?php echo $_date2; ?></a></li>
            <?php endif; if($_date3):?>
            <li data-value="<?php echo $_location3; ?>"><a href="#"><?php echo $_date3; ?></a></li>
            <?php endif; ?>
        </ul>
    </div>
    </div>
    </div>
    <?php
    }
    //echo '<p>No dates at the moment obtainable</p>';
}