Ir para conteúdo
View in the app

A better way to browse. Learn more.

GGames Fórum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Se você comercializa itens ÚNICOS em sua loja virtual, não faz sentido exibir o campo QUANTIDADE. É bem fácil esconder o campo para TODOS OS PRODUTOS.

image.png

1. Copie e cole o código abaixo e insira-o no final do FUNCTIONS.PHP do seu tema.

/**
 * @desc Remove in all product type
 */
function wc_remove_all_quantity_fields( $return, $product ) {
    return true;
}
add_filter( 'woocommerce_is_sold_individually', 'wc_remove_all_quantity_fields', 10, 2 );

Resultado.

image.png

Também vai sumir do checkout! Agora se você quer tirar a opção de quantidade de produtos específicos, não de todos... é possível também - antes de tudo não use o código acima em seu functions.

1. Acesse o produto desejado em PRODUTOS > LISTA DE PRODUTOS.

2. em INVENTÁRIO, marque a opção VENDER INDIVIDUALMENTE.

image.png

Créditos: Código fonte é do stackoverflow, texto e imagens por mim.

Feedback do Usuário

Comentários Recomendados

Não há comentários para mostrar.

Crie uma conta ou entre para comentar

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.