duancai9010
2019-05-15 07:10
浏览 163
已采纳

在Woocommerce中添加一个操作按钮,我的帐户订单在新窗口中打开

I'm going to add a button from my account order to make it go to a specific url. I made a button, but I want to open it with a new window instead of going to the page. What should I do? Down below is the code I added, and I'd like to open url here with a cage:

function sv_add_my_account_order_actions( $actions, $order ) {

    $actions['name'] = array(
        'url'  => 'the_action_url',
        'name' => 'The Button Text',
    );
    return $actions;
}
add_filter( 'woocommerce_my_account_my_orders_actions', 'sv_add_my_account_order_actions', 10, 2 );

how to add target="_blank" to each additional custom button?

2条回答 默认 最新

相关推荐 更多相似问题