wc_shipping_zone_method_order_uasort_comparison سورت منطقه حمل و نقل

تابع ووکامرسی wc_shipping_zone_method_order_uasort_comparison – سورت و ترتیب بندی منطقه حمل و نقل بر اساس uasort
Syntax – سینتکس
wc_shipping_zone_method_order_uasort_comparison( $a, $b );
Parameters – پارامتر ها (2)
- 1- $a
- 2- $b
Usage – نحوه استفاده
if ( !function_exists( 'wc_shipping_zone_method_order_uasort_comparison' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php';
}
// The a.
$a = null;
// The b.
$b = null;
// NOTICE! Understand what this does before running.
$result = wc_shipping_zone_method_order_uasort_comparison($a, $b);
Defined – محل تعریف
/includes/wc-core-functions.php
function wc_shipping_zone_method_order_uasort_comparison( $a, $b ) {
if ( $a->method_order === $b->method_order ) {
return 0;
}
return ( $a->method_order < $b->method_order ) ? -1 : 1;
}
versions – نسخه ها
از نسخه : 3.0.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر