0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【WooCommerce】注文詳細ページの「再注文」ボタンを非表示にする方法

Posted at

やりたいこと

WooCommerceの注文詳細ページ(マイアカウント → 注文履歴 → 注文詳細)に表示される「再注文」ボタンを非表示にしたい。

  • 作業の備忘録になります。
  • あくまでご参考になれば幸いです。

方法

functions.php に以下を追加:

/**
 * 注文詳細ページから再注文ボタンを削除
 */
function remove_order_again_button()
{
    remove_action(
        'woocommerce_order_details_after_order_table',
        'woocommerce_order_again_button'
    );
}
add_action('woocommerce_init', 'remove_order_again_button');

フック情報

項目
フック名 woocommerce_order_details_after_order_table
関数名 woocommerce_order_again_button
優先度 10(デフォルト)
提供元 WooCommerce本体

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?