add_action('woocommerce_email_customer_details', 'send_customer_ip_adress', 10, 4);
function send_customer_ip_adress($order, $sent_to_admin, $plain_text, $email){
// Just for admin new order notification
if( 'new_order' == $email->id ){
// WC3+ compatibility
$order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;
echo '<br><p><strong>Customer IP address:</strong> '. get_post_meta( $order_id, '_customer_ip_address', true ).'</p>';
}
}
<?php
// args
$args = array(
'numberposts' => -1,
'post_type' => 'dish',
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'new',
'value' => '1',
),
)
);
// query
$the_query = new WP_Query( $args );
?>
<?php if( $the_query->have_posts() ): ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div loading="lazy" id="tagmarginelements" class="col-12 col-xs-12 col-sm-12 col-md-4 col-lg-4 col-xl-4 mb-2">
<a href="<?php echo get_permalink(); ?>" class="not-link text-black" data-wpel-link="internal">
<div data="<?php echo $yebiwes ?>" class="dish card rounded-0 p-0 h-100">
<div class="card-body">
<h5 class="card-title" style="font-size: 18px"><?php the_title(); ?></h5>
<div class="text-center"><?php the_post_thumbnail('full', array('class' => 'img-fluid', 'alt' => $image_title, 'title' => $image_title)); ?></div>
<div class="like-btn"><?php echo do_shortcode( '[wp_ulike]' ); ?></div>
</div>
<?php if (has_post_thumbnail()) : ?>
<?php endif; ?>
</div>
</a>
</div>
<?php endwhile; ?>
<?php endif; ?>
$post_id_5 = get_post( 5 );
$title = $post_id_5->post_title;
#tinymce{
font-size:13px;
}
define('WP_HOME', 'http://site.ru/');
define('WP_SITEURL', 'http://site.ru/');
define('WP_HOME', 'https://site.ru/');
define('WP_SITEURL', 'https://site.ru/');