How to display price including tax with formatting?

Running any number through the function woocommerce_price() will format that number with the number of decimals, thousands separator, currency symbol and currency location chosen in the admin. Add the function to your code snippet should format the price correctly: <?php if ( $price_html = $product->get_price_including_tax() ): ?> <span class=”price”><?php echo woocommerce_price($price_html); ?></span>

Class variables not correct on page

When you write that code <?php $pageopi = new opi; ?> // 1. object created // 2. __construct is called // 3. init action hook is set but is never executed so is o_check method <?php echo $pageopi->mg; ?> At this stage, init hook was executed long time before $pageopi is created actually, when page … Read more

How to move the “create new account” higher in woocommerce

This can be done by customizing the form-billing.php template, just move this part: <?php if (!is_user_logged_in() && get_option(‘woocommerce_enable_signup_and_login_from_checkout’)==”yes”) : ?> //more code.. <?php endif; ?> right before this line: <?php do_action(‘woocommerce_before_checkout_billing_form’, $checkout); ?>

Display Custom Field Value on Admin Page Column

The main errors where the missing of the $post_ID parameter in page_template_field and using $custom_field_id instead of $post_ID. Anyway, this works and is simpler: add_filter(‘manage_pages_columns’, ‘column_page’); function column_page($defaults) { $defaults[‘column_template’] = ‘Page Template’; return $defaults; } add_action(‘manage_pages_custom_column’,’column_page_template’,10,2); function column_page_template($column_name, $post_ID) { if ($column_name == ‘column_template’) { $custom_field_values = get_post_meta($post_ID,’page_template’); if (!empty($custom_field_values)) { echo ‘<p> ‘. … Read more