Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce-quick-donation
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wordpress
woocommerce-quick-donation
Commits
231f3fe8
Commit
231f3fe8
authored
Nov 01, 2015
by
Varun Sridharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue Fixed with wcqd_get_project_name
Added default user configurable title for easy use
parent
adffb08b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
wc-quick-donation-functions.php
includes/wc-quick-donation-functions.php
+4
-5
No files found.
includes/wc-quick-donation-functions.php
View file @
231f3fe8
...
...
@@ -8,7 +8,7 @@ if(! function_exists('wcqd_get_message')){
}
if
(
!
function_exists
(
'wcqd_project_limit'
)){
function
wcqd_project_limit
(
$project_id
=
0
,
$type
=
'm
ax
'
){
function
wcqd_project_limit
(
$project_id
=
0
,
$type
=
'm
in
'
){
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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment