add_action( 'wp_default_scripts', 'include_jquery_into_footer' );
function include_jquery_into_footer( $wp_scripts ) {
if( is_admin() ) {
return;
}
$wp_scripts->add_data( 'jquery', 'group', 1 );
$wp_scripts->add_data( 'jquery-core', 'group', 1 );
$wp_scripts->add_data( 'jquery-migrate', 'group', 1 );
foreach ($items as $item) {
$product = $item->get_product();
$qty = $item->get_quantity() ? $item->get_quantity() : 1;
$price = wc_format_localized_price($item->get_total() / $qty);
$text2 .= 'Товар :' . $product->get_name() . ' Кол-во :' . $qty . ' Цена :' . $price;
}
foreach ( $order->get_items() as $item_id => $item ) {
$product_id = $item->get_product_id();
$variation_id = $item->get_variation_id();
$product = $item->get_product();
$name = $item->get_name();
$quantity = $item->get_quantity();
$subtotal = $item->get_subtotal();
$total = $item->get_total();
$tax = $item->get_subtotal_tax();
$taxclass = $item->get_tax_class();
$taxstat = $item->get_tax_status();
$allmeta = $item->get_meta_data();
$custom_meta = $item->get_meta( 'custom_meta_key', true );
$type = $item->get_type();
}