Skip to content

Instantly share code, notes, and snippets.

@manospsyx
Created December 20, 2017 12:44
Show Gist options
  • Save manospsyx/cbfd18dc880c86ce3c7c6b192abd6fd3 to your computer and use it in GitHub Desktop.
Save manospsyx/cbfd18dc880c86ce3c7c6b192abd6fd3 to your computer and use it in GitHub Desktop.
Switch on AND dependency relationship in WC Product Dependencies
add_filter( 'wc_pd_dependency_relationship', 'wc_pb_dependency_relationship_and', 10, 2 );
function wc_pb_dependency_relationship_and( $relationship, $product ) {
$relationship = 'and';
return $relationship;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment