Server IP : 162.0.217.223 / Your IP : 216.73.216.153 Web Server : LiteSpeed System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : mypckeys ( 1539) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/mypckeys/www/wp-content/themes/woodmart/ |
Upload File : |
<?php /** * * The framework's functions and definitions */ define( 'WOODMART_THEME_DIR', get_template_directory_uri() ); define( 'WOODMART_THEMEROOT', get_template_directory() ); define( 'WOODMART_IMAGES', WOODMART_THEME_DIR . '/images' ); define( 'WOODMART_SCRIPTS', WOODMART_THEME_DIR . '/js' ); define( 'WOODMART_STYLES', WOODMART_THEME_DIR . '/css' ); define( 'WOODMART_FRAMEWORK', '/inc' ); define( 'WOODMART_DUMMY', WOODMART_THEME_DIR . '/inc/dummy-content' ); define( 'WOODMART_CLASSES', WOODMART_THEMEROOT . '/inc/classes' ); define( 'WOODMART_CONFIGS', WOODMART_THEMEROOT . '/inc/configs' ); define( 'WOODMART_HEADER_BUILDER', WOODMART_THEME_DIR . '/inc/header-builder' ); define( 'WOODMART_ASSETS', WOODMART_THEME_DIR . '/inc/admin/assets' ); define( 'WOODMART_ASSETS_IMAGES', WOODMART_ASSETS . '/images' ); define( 'WOODMART_API_URL', 'https://xtemos.com/wp-json/xts/v1/' ); define( 'WOODMART_DEMO_URL', 'https://woodmart.xtemos.com/' ); define( 'WOODMART_PLUGINS_URL', WOODMART_DEMO_URL . 'plugins/' ); define( 'WOODMART_DUMMY_URL', WOODMART_DEMO_URL . 'dummy-content-new/' ); define( 'WOODMART_TOOLTIP_URL', WOODMART_DEMO_URL . 'theme-settings-tooltips/' ); define( 'WOODMART_SLUG', 'woodmart' ); define( 'WOODMART_CORE_VERSION', '1.0.42' ); define( 'WOODMART_WPB_CSS_VERSION', '1.0.2' ); if ( ! function_exists( 'woodmart_load_classes' ) ) { function woodmart_load_classes() { $classes = array( 'class-singleton.php', 'class-api.php', 'class-config.php', 'class-layout.php', 'class-autoupdates.php', 'class-activation.php', 'class-notices.php', 'class-theme.php', 'class-registry.php', ); foreach ( $classes as $class ) { require WOODMART_CLASSES . DIRECTORY_SEPARATOR . $class; } } } woodmart_load_classes(); new XTS\Theme(); define( 'WOODMART_VERSION', woodmart_get_theme_info( 'Version' ) ); //custom fee processing code add_action( 'woocommerce_checkout_before_order_review_heading', 'cpp_section_switch' ); function cpp_section_switch() { ?> <section id="" class="cpp-section"> <div class="cpp-Wrapper"> <div class="cpp-title-wrapper"> <span class="cpp-title">Customer Protection Program</span> </div> <div> <ul class="cpp-subscription-ul"> <li> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" font-size="14px"> <path d="M6 12l4 4 8-8" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> </svg> <span> <strong>Priority Support Line</strong> - You will be the number one priority in our customer support </span> </li> <li> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" font-size="14px"> <path d="M6 12l4 4 8-8" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> </svg> <span> <strong>Lifetime Purchase Protection</strong> - 100% Purchase protection with a lifetime warranty </span> </li> <li> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" font-size="14px"> <path d="M6 12l4 4 8-8" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> </svg> <span> <strong>Dedicated support</strong> - No more waiting for resolution </span> </li> </ul> </div> <p class="form-row update_totals_on_change validate-required validate-required" id="cpp_active_subscripton_field" data-priority=""> <label class="cpp-subscription-label"> <input class="update_totals_on_change validate-required validate-required" type="checkbox" id="cpp_active_subscripton" name="cpp_active_subscripton" checked=""> <span class="cpp-subproduct active"> <i class=" active"> <svg class=" active" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" font-size="16px"> <path d="M6 12l4 4 8-8" stroke="currentColor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> </svg> </i> </span> </label> </p> </div> </section> <?php } // Add a checkout fee based on the checkbox state function cpp_add_custom_fee() { if (isset($_POST['post_data']) && strpos($_POST['post_data'], 'cpp_active_subscripton') !== false) { $fee = 1.99; // Adjust this value as needed WC()->cart->add_fee('Xware42 CPP x 1', $fee); } } add_action('woocommerce_cart_calculate_fees', 'cpp_add_custom_fee');