-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2eb219
commit bb090b5
Showing
10 changed files
with
230 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
/** | ||
* Cost of Goods for WooCommerce - Options. | ||
* | ||
* @version 3.3.7 | ||
* @since 3.3.7 | ||
* @author WPFactory | ||
*/ | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit; | ||
} // Exit if accessed directly | ||
|
||
if ( ! class_exists( 'Alg_WC_Cost_of_Goods_Options' ) ) { | ||
|
||
class Alg_WC_Cost_of_Goods_Options { | ||
|
||
/** | ||
* Options. | ||
* | ||
* @since 3.3.7 | ||
* | ||
* @var array | ||
*/ | ||
protected $options = array(); | ||
|
||
/** | ||
* get_option. | ||
* | ||
* @version 3.3.7 | ||
* @since 3.3.7 | ||
* | ||
* @param $option | ||
* @param $default_value | ||
* @param $get_value_from_cache | ||
* | ||
* @return false|mixed|null | ||
*/ | ||
function get_option( $option, $default_value = false, $get_value_from_cache = true ) { | ||
if ( | ||
! isset( $this->options[ $option ] ) || | ||
! $get_value_from_cache | ||
) { | ||
$this->options[ $option ] = get_option( $option, $default_value ); | ||
} | ||
|
||
return $this->options[ $option ]; | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.