| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
if ( ! function_exists( 'bppiv_get_woo_template' ) ) { |
| 7 |
function bppiv_get_woo_template( $template ) { |
| 8 |
$path = BPPIV_PATH . 'inc/Woocommerce/template/' . $template; |
| 9 |
if ( file_exists( $path ) ) { |
| 10 |
require $path; |
| 11 |
} |
| 12 |
} |
| 13 |
} |
| 14 |
|
| 15 |
if ( ! function_exists( 'bppiv_isset' ) ) { |
| 16 |
// get values from csf |
| 17 |
function bppiv_isset( $array ) { |
| 18 |
return function( $key1, $isBoolean = false, $default = false, $key2 = '' ) use ( $array ) { |
| 19 |
if ( isset( $array[ $key1 ][ $key2 ] ) ) { |
| 20 |
return $isBoolean ? (bool) $array[ $key1 ][ $key2 ] : $array[ $key1 ][ $key2 ]; |
| 21 |
} |
| 22 |
if ( isset( $array[ $key1 ] ) ) { |
| 23 |
return $isBoolean ? (bool) $array[ $key1 ] : $array[ $key1 ]; |
| 24 |
} |
| 25 |
return $default; |
| 26 |
}; |
| 27 |
} |
| 28 |
} |
| 29 |
|