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
1469941b
Commit
1469941b
authored
Jun 12, 2015
by
Varun Sridharan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6 from bgallagh3r/master
Fix issue where donation_exists() throws an error due to NULL value
parents
ceedeef6
382c8613
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
woocommerce-quick-donation.php
woocommerce-quick-donation.php
+2
-2
No files found.
woocommerce-quick-donation.php
View file @
1469941b
...
@@ -216,7 +216,7 @@ class wc_quick_donation{
...
@@ -216,7 +216,7 @@ class wc_quick_donation{
*/
*/
public
function
donation_exsits
(){
public
function
donation_exsits
(){
global
$woocommerce
;
global
$woocommerce
;
if
(
sizeof
(
$woocommerce
->
cart
->
get_cart
())
>
0
){
if
(
is_object
(
$woocommerce
->
cart
)
&&
sizeof
(
$woocommerce
->
cart
->
get_cart
())
>
0
){
foreach
(
$woocommerce
->
cart
->
get_cart
()
as
$cart_item_key
=>
$values
){
foreach
(
$woocommerce
->
cart
->
get_cart
()
as
$cart_item_key
=>
$values
){
$_product
=
$values
[
'data'
];
$_product
=
$values
[
'data'
];
if
(
$_product
->
id
==
$this
->
donation_id
){
if
(
$_product
->
id
==
$this
->
donation_id
){
...
@@ -562,4 +562,4 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
...
@@ -562,4 +562,4 @@ if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', g
function
wc_quick_donation_notice
()
{
function
wc_quick_donation_notice
()
{
echo
'<div class="error"><p><strong> <i> Woocommerce Quick Donation </i> </strong> Requires <a href="'
.
admin_url
(
'plugin-install.php?tab=plugin-information&plugin=woocommerce'
)
.
'"> <strong> <u>Woocommerce</u></strong> </a> To Be Installed And Activated </p></div>'
;
echo
'<div class="error"><p><strong> <i> Woocommerce Quick Donation </i> </strong> Requires <a href="'
.
admin_url
(
'plugin-install.php?tab=plugin-information&plugin=woocommerce'
)
.
'"> <strong> <u>Woocommerce</u></strong> </a> To Be Installed And Activated </p></div>'
;
}
}
?>
?>
\ No newline at end of file
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