Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce_bpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
8
Issues
8
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_bpd
Commits
6a7375b3
Commit
6a7375b3
authored
May 25, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Missing prices class
parent
5b577d52
Pipeline
#37
skipped
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
class-product-addon-prices.php
classes/class-product-addon-prices.php
+29
-0
No files found.
classes/class-product-addon-prices.php
0 → 100644
View file @
6a7375b3
<?php
/**
* Product_Addon_cart class.
*/
class
Product_Addon_Prices
{
private
$currency_switcher
=
false
;
function
__construct
()
{
if
(
in_array
(
'woocommerce-currency-switcher/index.php'
,
apply_filters
(
'active_plugins'
,
get_option
(
'active_plugins'
)
)
)
)
{
$this
->
currency_switcher
=
true
;
}
}
public
function
get_current_currency
()
{
global
$WOOCS
;
if
(
$this
->
currency_switcher
)
return
$WOOCS
->
current_currency
;
return
get_woocommerce_currency
();
}
public
function
get_current_price
(
$price
)
{
if
(
$this
->
currency_switcher
)
return
apply_filters
(
'woocs_exchange_value'
,
$price
);
return
$price
;
}
}
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