1. Casa
  2. Knowledge Base
  3. Abbonamenti WC Vendors
  4. Stile
  5. Come escludere l'iscrizione dalla visualizzazione?
  1. Casa
  2. Knowledge Base
  3. Abbonamenti WC Vendors
  4. Come escludere l'iscrizione dalla visualizzazione?

Come escludere l'iscrizione dalla visualizzazione?

Potrebbe esserci un momento in cui è necessario escludere un'iscrizione dalla visualizzazione nella dashboard del venditore. Il seguente snippet ti permetterà di escludere uno o più prodotti di iscrizione dall'elenco. 

Il seguente codice andrebbe nel file functions.php del tuo tema.

<?php 
add_filter( 'wcv_membership_product_query_args', 'exclude_membership_plan' );
 function exclude_membership_plan( $args ){ 
	$current_page_id = get_the_ID();
  
  // If this is not the pro dashboard do nothing
	if ( ! wcv_is_dashboard_page( $current_page_id ) ){ 
		return $args;
	}
	// This should be the membership product IDs in this example the product ID is 471
	$plans = array( 471 );
	$args['post__not_in'] = $plans;
	return $args;
 }
Questo articolo è stato utile?

Articoli Correlati

Serve supporto?

Non riesci a trovare la risposta che cerchi?
Contatta il supporto
Completa il tuo acquisto