Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce-galaxyfunder
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wordpress
woocommerce-galaxyfunder
Commits
92df61f8
Commit
92df61f8
authored
Aug 14, 2015
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support currency switcher for perk boxes
parent
6ceb6446
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
crowdfunding.php
crowdfunding.php
+12
-2
class_perk_metabox.php
inc/class_perk_metabox.php
+3
-2
price.php
woocommerce/single-product/price.php
+1
-1
description.php
woocommerce/single-product/tabs/description.php
+2
-2
No files found.
crowdfunding.php
View file @
92df61f8
...
...
@@ -3105,7 +3105,6 @@ class CrowdFunding {
foreach
(
$perkrule
as
$key
=>
$perk
)
{
$perkname
=
str_replace
(
''
,
'_'
,
$perk
[
'name'
]);
$currentcount
=
(
int
)
get_post_meta
(
$item
[
'product_id'
],
$perkname
.
$perk
[
'amount'
]
.
'update_perk_claim'
,
true
);
if
(
$perk
[
'limitperk'
]
==
'cf_limited'
)
{
...
...
@@ -4222,4 +4221,15 @@ if (get_option('cf_campaign_restrict_other_products') == '1') {
add_action
(
'woocommerce_add_to_cart_validation'
,
'cf_restrict_add_to_cart_products'
,
10
,
5
);
}
add_action
(
'woocommerce_single_product_summary'
,
array
(
'CrowdFunding'
,
'checkingfrontend_galaxy'
));
// Experimental currency switcher support
function
woocs_convert
(
$amount
)
{
if
(
class_exists
(
"WC_Aelia_CurrencySwitcher"
))
{
$woocs_instance
=
WC_Aelia_CurrencySwitcher
::
instance
();
$woocs_settings
=
WC_Aelia_CurrencySwitcher
::
settings
();
$amount
=
$woocs_instance
->
convert
(
$amount
,
$woocs_settings
->
base_currency
(),
$woocs_instance
->
get_selected_currency
());
}
return
$amount
;
}
?>
inc/class_perk_metabox.php
View file @
92df61f8
...
...
@@ -660,6 +660,7 @@ class CFPerkMetaBox {
<?php
}
?>
<?php
foreach
(
$perkrule
as
$i
=>
$perk
)
{
$perk
[
'amount'
]
=
woocs_convert
(
$perk
[
'amount'
]);
$perkname
=
str_replace
(
''
,
'_'
,
$perk
[
'name'
]);
//echo $newcounterclaim = (int) get_post_meta($post->ID, $perkname . '[update_perk_claim]', true);
$newcounterclaim
=
(
int
)
get_post_meta
(
$post
->
ID
,
$perkname
.
$perk
[
'amount'
]
.
'update_perk_claim'
,
true
);
...
...
@@ -1344,6 +1345,7 @@ class CFPerkMetaBox {
<?php
}
?>
<?php
foreach
(
$perkrule
as
$i
=>
$perk
)
{
$perk
[
'amount'
]
=
woocs_convert
(
$perk
[
'amount'
]);
$perkname
=
str_replace
(
''
,
'_'
,
$perk
[
'name'
]);
//echo $newcounterclaim = (int) get_post_meta($post->ID, $perkname . '[update_perk_claim]', true);
$newcounterclaim
=
(
int
)
get_post_meta
(
$post
->
ID
,
$perkname
.
$perk
[
'amount'
]
.
'update_perk_claim'
,
true
);
...
...
@@ -1689,7 +1691,6 @@ class CFPerkMetaBox {
$perkrule
=
get_post_meta
(
$post
->
ID
,
'perk'
,
true
);
$i
=
0
;
foreach
(
$perkrule
as
$perk
)
{
foreach
(
$listofamount
as
$amount
)
{
if
(
$perk
[
'amount'
]
==
(
int
)
$amount
)
{
$length
=
count
(
array_keys
(
$listofamount
,
(
int
)
$amount
));
...
...
woocommerce/single-product/price.php
View file @
92df61f8
woocommerce/single-product/tabs/description.php
View file @
92df61f8
...
...
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global
$woocommerce
,
$post
;
$heading
=
esc_html
(
apply_filters
(
'woocommerce_product_description_heading'
,
__
(
'
Product Description
'
,
'woocommerce'
)
)
);
$heading
=
esc_html
(
apply_filters
(
'woocommerce_product_description_heading'
,
__
(
'
About this project
'
,
'woocommerce'
)
)
);
?>
<h2>
<?php
echo
$heading
;
?>
</h2>
...
...
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