Prevent empty attributes in permalinks

Closes #5714
This commit is contained in:
Mike Jolley 2014-07-30 10:22:12 +01:00
parent a45ff0b6de
commit 2cb66fe4b9
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ class WC_Product_Variation extends WC_Product {
* @return string
*/
public function get_permalink() {
return add_query_arg( $this->variation_data, get_permalink( $this->id ) );
return add_query_arg( array_filter( $this->variation_data ), get_permalink( $this->id ) );
}
/**