Ameliabooking_Helpers::get_services_by_category( $category_id )

Get all amelia services by category.


Return Return

(array) The wpdb query result.


Source Source

File: src/integrations/ameliabooking/helpers/ameliabooking-helpers.php

	public function get_services_by_category( $category_id = 0 ) {

		global $wpdb;

		return $wpdb->get_results(
			$wpdb->prepare(
				"SELECT id, name FROM {$wpdb->prefix}amelia_services 
				WHERE categoryId = %d AND status = %s 
				ORDER BY name ASC LIMIT 100",
				$category_id,
				'visible'
			),
			OBJECT
		);
	}