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
47e11936
Commit
47e11936
authored
Jan 23, 2016
by
Varun Sridharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Template Issue fixed
parent
be2cf371
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
.gitignore
.gitignore
+1
-0
class-quick-donation-functions.php
includes/class-quick-donation-functions.php
+3
-2
class-new-email.php
includes/emails/class-new-email.php
+3
-2
No files found.
.gitignore
View file @
47e11936
...
@@ -11,3 +11,4 @@ wp-content/cache/
...
@@ -11,3 +11,4 @@ wp-content/cache/
wp-content/upgrade/
wp-content/upgrade/
wp-content/uploads/
wp-content/uploads/
wp-content/wp-cache-config.php
wp-content/wp-cache-config.php
Thumbs.db
includes/class-quick-donation-functions.php
View file @
47e11936
...
@@ -308,10 +308,11 @@ class WooCommerce_Quick_Donation_Functions {
...
@@ -308,10 +308,11 @@ class WooCommerce_Quick_Donation_Functions {
if
(
$found
){
if
(
$found
){
return
$file
;
return
$file
;
}
else
{
}
/*
else {
$file = wc_locate_template($template_name);
$file = wc_locate_template($template_name);
return $file;
return $file;
}
}*/
return
$located
;
return
$located
;
}
}
...
...
includes/emails/class-new-email.php
View file @
47e11936
...
@@ -35,7 +35,7 @@ class WC_QD_Donation_New_Email extends WC_Email {
...
@@ -35,7 +35,7 @@ class WC_QD_Donation_New_Email extends WC_Email {
$this
->
template_html
=
'emails/donation-admin-new.php'
;
$this
->
template_html
=
'emails/donation-admin-new.php'
;
$this
->
template_plain
=
'emails/plain/admin-new-order.php'
;
$this
->
template_plain
=
'emails/plain/admin-new-order.php'
;
add_filter
(
'woocommerce_template_directory'
,
array
(
$this
,
'change_dir'
),
2
,
1
);
add_filter
(
'woocommerce_template_directory'
,
array
(
$this
,
'change_dir'
),
2
,
2
);
// Call parent constructor
// Call parent constructor
parent
::
__construct
();
parent
::
__construct
();
...
@@ -47,7 +47,8 @@ class WC_QD_Donation_New_Email extends WC_Email {
...
@@ -47,7 +47,8 @@ class WC_QD_Donation_New_Email extends WC_Email {
$this
->
recipient
=
get_option
(
'admin_email'
);
$this
->
recipient
=
get_option
(
'admin_email'
);
}
}
public
function
change_dir
(
$dir
){
public
function
change_dir
(
$dir
,
$template
){
if
(
!
in_array
(
$template
,
array
(
'emails/donation-completed.php'
,
'emails/plain/donation-completed.php'
))){
return
$dir
;}
$dir
=
$dir
.
'/donation'
;
$dir
=
$dir
.
'/donation'
;
return
$dir
;
return
$dir
;
}
}
...
...
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