VersteckenPhp

PHP-Programmierer chatten hier
Anonymous
 Verstecken

Post by Anonymous »

Ich arbeite am WooCommerce -Schuhe -Shop und mein Kunde hat eine Anforderung zur Variation. Er möchte sich nicht auf Lagervariationen verstecken.

Code: Select all

/**
* shortcode for variations when out of stock
*/
add_filter( 'woocommerce_variation_is_active', 'grey_out_variations_when_out_of_stock', 10, 2 );

function grey_out_variations_when_out_of_stock( $grey_out, $variation ) {

if ( ! $variation->is_in_stock() )
return false;

return true;
}
Gibt es eine Lösung dafür?>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post