S
S
sasha7612020-06-25 13:00:31
WordPress
sasha761, 2020-06-25 13:00:31

How to display the payments menu item in my-account?

Good afternoon.
You need to display the payments tab on the my-account page, but for some reason it is not displayed, I think it's somewhere in the settings, because I found this code in the woocommerce files.

// Check if payment gateways support add new payment methods.
  if ( isset( $items['payment-methods'] ) ) {
    $support_payment_methods = false;
    foreach ( WC()->payment_gateways->get_available_payment_gateways() as $gateway ) {
      if ( $gateway->supports( 'add_payment_method' ) || $gateway->supports( 'tokenization' ) ) {
        $support_payment_methods = true;
        break;
      }
    }

    if ( ! $support_payment_methods ) {
      unset( $items['payment-methods'] );
    }
  }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2020-06-25
@azerphoenix

Removing and adding links to the /my-account page menu
https://rudrastyh.com/woocommerce/my-account-menu.html
Adding a custom page to the menu - https://iconicwp.com/blog/add-custom-page- account-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question