?>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery-3.6.0.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js" async></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/bootstrap-select.min.js@1"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript">$('.selectpicker').selectpicker();</script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/bootstrap.bundle.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/popper.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/bootstrap.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery.smoothscroll.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/slick.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/nouislider.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/jquery-editable-select.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/wow.min.js"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/custom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js" integrity="sha512-nOQuvD9nKirvxDdvQ9OMqe2dgapbPB7vYAMrzJihw5m+aNcf0dX53m6YxM4LgA9u8e9eg9QX+/+mPu8kCNpV2A==" crossorigin="anonymous" type="2ef1d8b03fb0311f9e134e45-text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/aes.min.js" integrity="sha512-eqbQu9UN8zs1GXYopZmnTFFtJxpZ03FHaBMoU3dwoKirgGRss9diYqVpecUgtqW2YRFkIVgkycGQV852cD46+w==" crossorigin="anonymous" type="2ef1d8b03fb0311f9e134e45-text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/pad-zeropadding.min.js" integrity="sha512-txZjFJoDvbM8FJj9HuAHasxA/M76UjnMCXLHwuciIGDKUW9EB9PJVA6foG0vymuK9hu2gdpL60imO9VrTlEF7w==" crossorigin="anonymous" type="2ef1d8b03fb0311f9e134e45-text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/enc-hex.min.js" integrity="sha512-jDU0YCduSP8z0cvjfPFm7/zN/viOcmNWlq0GUIcjVhuv4WoKcMppghamg4aeuBtJaA0wjtYfxwQjPpVuYGEsBA==" crossorigin="anonymous" type="2ef1d8b03fb0311f9e134e45-text/javascript"></script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript">
const boost_type = 'division_solo';
</script>
<script type="2ef1d8b03fb0311f9e134e45-text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/boost-script.js@5.1"></script>
<script src="<?php echo get_template_directory_uri(); ?>/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="2ef1d8b03fb0311f9e134e45-|49" defer=""></script><script type="text/javascript">(function(){window['__CF$cv$params']={r:'69862a0fac5f1622',m:'w9.g166I8d9OaMXdNt5eapuW_kWXA4fj5BzjjGER3VI-1633264044-0-AetPrTFxHWceaDFHbJNVyj4Fju34Nc9CgaV26SK+4GXJo8lz+Sq1OML2ej+rW9k9J20ODwDQBwMco8b8bXTrYYKbh/WHeMI49GeUkOggNze8URrI/n42iGkYsW+q4kWKLQ==',s:[0x81198b249d,0x2c72b21e3a],}})();</script>
<?php
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', get_template_directory_uri() .'/js/jquery-3.6.0.min.js' );
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'trustpilot-script', 'https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js', array(), null, true );
wp_enqueue_script( 'select-script', get_template_directory_uri() .'/js/bootstrap-select.min.js@1', array(), 'null', true );
wp_add_inline_script( 'select-script', '$(\'.selectpicker\').selectpicker();' );
wp_enqueue_script( 'bundle-script', get_template_directory_uri() .'/js/bootstrap.bundle.min.js', array(), 'null', true );
wp_enqueue_script( 'popper-script', get_template_directory_uri() .'/js/popper.min.js', array(), null, true );
wp_enqueue_script( 'bootstrap-script', get_template_directory_uri() .'/js/bootstrap.min.js', array(), null, true );
wp_enqueue_script( 'smoothscroll-script', get_template_directory_uri() .'/js/jquery.smoothscroll.min.js', array('jquery'), null, true );
wp_enqueue_script( 'slick-script', get_template_directory_uri() .'/js/slick.min.js', array(), null, true );
wp_enqueue_script( 'nouislider-script', get_template_directory_uri() .'/js/nouislider.min.js', array(), null, true );
wp_enqueue_script( 'editable-script', get_template_directory_uri() .'/js/jquery-editable-select.js', array('jquery'), null, true );
wp_enqueue_script( 'wow-script', get_template_directory_uri() .'/js/wow.min.js', array(), null, true );
wp_enqueue_script( 'custom-script', get_template_directory_uri() .'/js/custom.js', array(), null, true );
wp_enqueue_script( 'crypto-script', 'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/crypto-js.min.js', array(), null, true );
wp_enqueue_script( 'aes-script', 'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/aes.min.js', array(), null, true );
wp_enqueue_script( 'pad-script', 'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/pad-zeropadding.min.js', array(), null, true );
wp_enqueue_script( 'enc-script', 'https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/enc-hex.min.js', array(), null, true );
wp_enqueue_script( 'solo-script', get_template_directory_uri() .'/js/other/solo.js', array(), null, true );
wp_enqueue_script( 'boost-script', get_template_directory_uri() .'/js/boost-script.js@5.1', array(), null, true );
wp_enqueue_script( 'rocket-script', get_template_directory_uri() .'/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js', array(), null, true );
add_action( 'woocommerce_email_order_meta', 'misha_add_email_order_meta', 10, 3 );
/*
* @param $order_obj Order Object
* @param $sent_to_admin If this email is for administrator or for a customer
* @param $plain_text HTML or Plain text (can be configured in WooCommerce > Settings > Emails)
*/
function misha_add_email_order_meta( $order_obj, $sent_to_admin, $plain_text ){
// this order meta checks if order is marked as a gift
$is_gift = get_post_meta( $order_obj->get_order_number(), 'is_gift', true );
// we won't display anything if it is not a gift
if( empty( $is_gift ) )
return;
// ok, if it is the gift order, get all the other fields
$gift_wrap = get_post_meta( $order_obj->get_order_number(), 'gift_wrap', true );
$gift_recipient = get_post_meta( $order_obj->get_order_number(), 'gift_name', true );
$gift_message = get_post_meta( $order_obj->get_order_number(), 'gift_message', true );
// ok, we will add the separate version for plaintext emails
if ( $plain_text === false ) {
// you shouldn't have to worry about inline styles, WooCommerce adds them itself depending on the theme you use
echo '<h2>Gift Information</h2>
<ul>
<li><strong>Is gift?</strong> Yes</li>
<li><strong>Gift Wrap:</strong> ' . $gift_wrap . '</li>
<li><strong>Recipient name:</strong> ' . $gift_recipient . '</li>
<li><strong>Gift message:</strong> ' . wpautop( $gift_message ) . '</li>
</ul>';
} else {
echo "GIFT INFORMATION\n
Is gift: Yes
Gift Wrap: $gift_wrap
Recipient name: $gift_recipient
Gift message: $gift_message";
}
}
// this order meta checks if order is marked as a gift
$is_gift = get_post_meta( $order_obj->get_order_number(), 'is_gift', true );
// we won't display anything if it is not a gift
if( empty( $is_gift ) )
return;
$gift_wrap = get_post_meta( $order_obj->get_order_number(), 'gift_wrap', true );
$lp_field = get_post_meta( $order_obj->get_order_number(), 'billing_lp', true );
//* 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' ));
}