Merge pull request #17521 from woocommerce/fix/sort-tabs-callback
For code doing it wrong, ensure priority is set
This commit is contained in:
commit
d1157d6f0b
|
@ -1237,7 +1237,7 @@ if ( ! function_exists( 'woocommerce_sort_product_tabs' ) ) {
|
|||
* @return bool
|
||||
*/
|
||||
function _sort_priority_callback( $a, $b ) {
|
||||
if ( $a['priority'] === $b['priority'] ) {
|
||||
if ( ! isset( $a['priority'], $b['priority'] ) || $a['priority'] === $b['priority'] ) {
|
||||
return 0;
|
||||
}
|
||||
return ( $a['priority'] < $b['priority'] ) ? -1 : 1;
|
||||
|
|
Loading…
Reference in New Issue