-
-
Save iconicwp/9c23d6df54ff6194b71fb48de384bf54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable selected on archive. | |
* | |
* @param array $args | |
* | |
* @return array | |
*/ | |
function iconic_disable_selected_on_archive( $args ) { | |
if ( ! is_archive() ) { | |
return $args; | |
} | |
$args['selected'] = false; | |
return $args; | |
} | |
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'iconic_disable_selected_on_archive', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment