Commit 231f3fe8 authored by Varun Sridharan's avatar Varun Sridharan

Issue Fixed with wcqd_get_project_name

Added default user configurable title for easy use
parent adffb08b
......@@ -8,7 +8,7 @@ if(! function_exists('wcqd_get_message')){
}
if(! function_exists('wcqd_project_limit')){
function wcqd_project_limit($project_id = 0, $type = 'max'){
function wcqd_project_limit($project_id = 0, $type = 'min'){
if(empty($project_id)){return false; }
if($type !== 'min' && $type !== 'max'){return false;}
$function_toCal = $type.'_project';
......@@ -29,11 +29,10 @@ if(! function_exists('wcqd_get_project')){
}
if(! function_exists('wcqd_get_project_name')){
function wcqd_get_project_name($order_id = ''){
$title = false;
function wcqd_get_project_name($order_id = '', $default_title = ''){
$project_id = wcqd_get_project($order_id);
wcqd_project_limit($project_id);
$title = get_the_title($project_id);
if(empty($title)){return $default_title;}
return $title;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment