تابع wc_update_260_refunds بروزرسانی استرداد ووکامرس به نسخه 2.6.0
تابع ووکامرسی wc_update_260_refunds – بروزرسانی استرداد ووکامرس به نسخه 2.6.0
Syntax – سینتکس
wc_update_260_refunds();
Usage – نحوه استفاده
if ( !function_exists( 'wc_update_260_refunds' ) ) { require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-update-functions.php'; } // NOTICE! Understand what this does before running. $result = wc_update_260_refunds();
Defined – محل تعریف
/includes/wc-update-functions.php
function wc_update_260_refunds() { global $wpdb; /** * Refund item qty should be negative */ $wpdb->query( " UPDATE {$wpdb->prefix}woocommerce_order_itemmeta as item_meta LEFT JOIN {$wpdb->prefix}woocommerce_order_items as items ON item_meta.order_item_id = items.order_item_id LEFT JOIN {$wpdb->posts} as posts ON items.order_id = posts.ID SET item_meta.meta_value = item_meta.meta_value * -1 WHERE item_meta.meta_value > 0 AND item_meta.meta_key = '_qty' AND posts.post_type = 'shop_order_refund' " ); }
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر