403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.154
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/yme/wp-content/themes/oceanwp/assets/src/js/wp-plugins/woocommerce/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/yme/wp-content/themes/oceanwp/assets/src/js/wp-plugins/woocommerce/woo-custom-features.js
import WooResetVariations from "./custom-features/reset-variations";
import WooGridList from "./custom-features/woo-grid-list";
import WooGuestAccountPage from "./custom-features/woo-guest-account-page";
import WooQuantityButtons from "./custom-features/woo-quantity-buttons";
import WooScrollToReviewTab from "./custom-features/woo-scroll-to-review-tab";
import WooRemoveCategoriesCountParenthesis from "./custom-features/remove-categories-count-parenthesis";

class WooCustomFeatures {
    start = () => {
        this.resetVariations = new WooResetVariations();
        this.gridList = new WooGridList();
        this.guestAccountPage = new WooGuestAccountPage();
        this.quantityButtons = new WooQuantityButtons();
        this.reviewScroll = new WooScrollToReviewTab();
        this.widgets = new WooRemoveCategoriesCountParenthesis();

        /**
         * Because Woocommerce plugin uses jQuery custom event,
         * We also have to use jQuery to customize this event.
         */
        jQuery("body").on("updated_cart_totals", () => {
            this.quantityButtons.start();
        });

        jQuery( document ).on("append.infiniteScroll", () => {
            this.quantityButtons.start();
        });

        jQuery("body").on("removed_from_cart", (e, fragments, cart_hash, $btn) => {
            const productId = $btn.data('product_id');
            if( productId ) {
                const selector = `.button.add_to_cart_button.ajax_add_to_cart.added[data-product_id="${productId}"]`;
                if( jQuery(selector).length ) {
                    jQuery(selector).each((index, element) => {
                        jQuery(element).removeClass('added');
                        if(jQuery(element).next('a.added_to_cart').length) {
                            jQuery(element).next('a.added_to_cart').remove();
                        }
                    });
                }
            }
        });
    };
}

window.oceanwpWooCustomFeatures = new WooCustomFeatures();
oceanwpWooCustomFeatures.start();

Youez - 2016 - github.com/yon3zu
LinuXploit