Im using this function to add button "Order again" in actions
function cs_add_order_again_to_my_orders_actions( $actions, $order ) {
$payment_method = method_exists($order, 'get_payment_method') ? $order->get_payment_method() : $order->payment_method;
if ($payment_method === 'cod') {
$actions['order-again'] = array(
'url' => wp_nonce_url( add_query_arg( 'order_again', $order->id ) , 'woocommerce-order_again' ),
'name' => __( 'Transformer en commande', 'woocommerce' )
);
}
return $actions;
}
add_filter( 'woocommerce_my_account_my_orders_actions', 'cs_add_order_again_to_my_orders_actions', 50, 2 );
It works Fine but I want to display it also in View-order page
How I can extract a shortcode to display the button inside "View Order page"