Exemplo n.º 1
1
function mango_current_page_id()
{
    global $post, $wp_query;
    $current_page_id = '';
    // Get The Page ID You Need
    //wp_reset_postdata();
    if (class_exists("woocommerce")) {
        if (is_shop()) {
            ///|| is_product_category() || is_product_tag()) {
            $current_page_id = get_option('woocommerce_shop_page_id');
        } elseif (is_cart()) {
            $current_page_id = get_option('woocommerce_cart_page_id');
        } elseif (is_checkout()) {
            $current_page_id = get_option('woocommerce_checkout_page_id');
        } elseif (is_account_page()) {
            $current_page_id = get_option('woocommerce_myaccount_page_id');
        } elseif (is_view_order_page()) {
            $current_page_id = get_option('woocommerce_view_order_page_id');
        }
    }
    if ($current_page_id == '') {
        if (is_home() && is_front_page()) {
            $current_page_id = '';
        } elseif (is_home()) {
            $current_page_id = get_option('page_for_posts');
        } elseif (is_search() || is_category() || is_tag() || is_tax()) {
            $current_page_id = '';
            //}elseif(class_exists("woocommerce") && (is_shop() || is_product_category() || is_cart() || is_checkout() || is_account_page() || is_view_order_page() )){
            // $current_page_id = '';
        } elseif (!is_404()) {
            $current_page_id = $post->ID;
        }
    }
    return $current_page_id;
}
Exemplo n.º 2
0
<?php 
if ($endpoint_title = WC()->query->get_endpoint_title($endpoint)) {
    ?>
	<h3 class="endpoint-title">
		<?php 
    echo apply_filters('the_title', $endpoint_title);
    ?>
	</h3><!-- .endpoint-title -->
<?php 
}
?>



<?php 
if (is_view_order_page()) {
    ?>
<div class="col-md-10 noNo">
	<?php 
    /**
     * My Account content.
     * @since 2.6.0
     */
    do_action('woocommerce_account_content');
    ?>
</div>

<?php 
} else {
    ?>
Exemplo n.º 3
0
 public static function is_view_order_page()
 {
     return self::exists() && is_view_order_page();
 }
 function transaction_form_order_view($order)
 {
     if ($order->has_status('on-hold') && $order->payment_method == 'bKash' && is_view_order_page()) {
         self::tranasaction_form($order->id);
     }
 }