esc_html__( 'Order', 'bridge' ), 'order-date' => esc_html__( 'Date', 'bridge' ), 'order-status' => esc_html__( 'Status', 'bridge' ), 'order-total' => esc_html__( 'Total', 'bridge' ), 'order-actions' => ' ', ) ); $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => $order_count, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => wc_get_order_types( 'view-orders' ), 'post_status' => array_keys( wc_get_order_statuses() ), ) ) ); if ( $customer_orders ) : ?>
get_order_number(); ?> get_status() ) ); ?> get_formatted_order_total(), $item_count ); ?> array( 'url' => $order->get_checkout_payment_url(), 'name' => esc_html__( 'Pay', 'bridge' ), ), 'view' => array( 'url' => $order->get_view_order_url(), 'name' => esc_html__( 'View', 'bridge' ), ), 'cancel' => array( 'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ), 'name' => esc_html__( 'Cancel', 'bridge' ), ), ); if ( ! $order->needs_payment() ) { unset( $actions['pay'] ); } if ( ! in_array( $order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_cancel', array( 'pending', 'failed' ), $order ) ) ) { unset( $actions['cancel'] ); } /*** Our code modification inside Woo template - added class name for button element ***/ if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) { foreach ( $actions as $key => $action ) { echo '' . esc_html( $action['name'] ) . ''; } } ?> |