関数
Utils::getAllPublishedWelcartItems()
戻り値 戻り値
ファイル: src/Utils.php
public static function getAllPublishedWelcartItems() { global $wpdb; $welitems = []; $itemt = usces_get_tablename('usces_item'); $query = $wpdb->prepare( "SELECT posts.ID FROM $wpdb->posts AS posts JOIN $itemt AS itemt ON itemt.post_id = posts.ID WHERE post_status = %s", 'publish' ); $allitems = $wpdb->get_col($query); if (!empty($allitems)) { foreach ($allitems as $alli_post_id) { $welitem = self::getWelItemData($alli_post_id); if (!empty($welitem)) { $welitems[] = $welitem; } } } return $welitems; }