diff --git a/woocommerce/myaccount/orders.php b/woocommerce/myaccount/orders.php
index a940a35..bacce62 100644
--- a/woocommerce/myaccount/orders.php
+++ b/woocommerce/myaccount/orders.php
@@ -1,7 +1,7 @@
-
+
$column_name ) : ?>
@@ -65,34 +65,13 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
array(
- 'url' => $order->get_checkout_payment_url(),
- 'name' => __( 'Pay', 'woocommerce' )
- ),
- 'view' => array(
- 'url' => $order->get_view_order_url(),
- 'name' => __( 'View', 'woocommerce' )
- ),
- 'cancel' => array(
- 'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
- 'name' => __( 'Cancel', 'woocommerce' )
- )
- );
-
- 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'] );
- }
-
- if ( $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ) ) {
- foreach ( $actions as $key => $action ) {
- echo '' . esc_html( $action['name'] ) . '';
- }
+ $actions = wc_get_account_orders_actions( $order );
+
+ if ( ! empty( $actions ) ) {
+ foreach ( $actions as $key => $action ) {
+ echo '' . esc_html( $action['name'] ) . '';
}
+ }
?>