You appear to be a bot. Output may be restricted
Description
Sort by name (numeric).
Usage
$int = _wc_get_product_terms_name_num_usort_callback( $a, $b );
Parameters
- $a
- ( WP_Post ) required – First item to compare.
- $b
- ( WP_Post ) required – Second item to compare.
Returns
int
Source
File name: woocommerce/includes/wc-term-functions.php
Lines:
1 to 11 of 11
function _wc_get_product_terms_name_num_usort_callback( $a, $b ) { $a_name = (float) $a->name; $b_name = (float) $b->name; if ( abs( $a_name - $b_name ) < 0.001 ) { return 0; } return ( $a_name < $b_name ) ? -1 : 1; }