Skip to content

Category: WordPress

抓取woocommerce最新訂單編號

函式過不去 沒辦法,只好從SQL資料庫抓了 global $wpdb; $order_id=$wpdb->get_var( “SELECT order_id FROM {$wpdb->prefix}woocommerce_order_items ORDER BY order_id DESC LIMIT 1″ );

Leave a Comment