Default Attributes for WooCommerce

How to exclude some attribute from the stock-based default attributes calculation?
Update the attribute id:

add_filter( 'daw_max_variations', 'daw_exclude_attribute', 10, 2 );
function daw_exclude_attribute( $max_variations, $attribute ) {
	$excluded_attribute = 25;
	return $excluded_attribute === $attribute['id'] ? 0 : $max_variations;
}

How to set the plugin’s cache expiration time?
Update the number of seconds (1 means 1 second- suitable for testing, 3600 means hour- suitable for production):

add_filter( 'daw_transient_expiration', 'daw_disable_transients' );
function daw_disable_transients() {
	return '1';
}

Leave a comment

Your email address will not be published. Required fields are marked *