ASTRA_Ext_WooCommerce_Markup::__construct()
Constructor
Description
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function __construct() { add_action( 'astra_get_css_files', array( $this, 'add_styles' ) ); add_action( 'astra_get_js_files', array( $this, 'add_scripts' ) ); add_filter( 'woocommerce_output_related_products_args', array( $this, 'related_products_args' ) ); add_filter( 'get_the_post_type_description', 'astra_woo_remove_shop_page_description', 10, 2 ); add_filter( 'body_class', array( $this, 'body_class' ) ); add_filter( 'post_class', array( $this, 'post_class' ) ); // Single product. add_filter( 'woocommerce_loop_add_to_cart_args', array( $this, 'add_to_cart_args' ), 10, 2 ); add_filter( 'woocommerce_sale_flash', array( $this, 'sale_flash' ), 10, 3 ); add_action( 'wp', array( $this, 'single_product_customization' ) ); add_action( 'wp', array( $this, 'customization_checkout_page' ) ); add_action( 'wp', array( $this, 'customization_cart_page' ) ); // Load WooCommerce shop page styles. add_action( 'wp', array( $this, 'shop_page_styles' ) ); $astra_woocommerce_instance = Astra_Woocommerce::get_instance(); add_action( 'woocommerce_shop_loop', array( $this, 'init_quick_view' ), 999 ); // Pagination. add_action( 'wp', array( $this, 'common_actions' ), 999 ); add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) ); add_filter( 'astra_theme_js_localize', array( $this, 'shop_js_localize' ) ); // if user not logged in. // quick view ajax. add_action( 'wp_ajax_ast_load_product_quick_view', array( $this, 'ast_load_product_quick_view_ajax' ) ); add_action( 'wp_ajax_nopriv_ast_load_product_quick_view', array( $this, 'ast_load_product_quick_view_ajax' ) ); // Custom Template Quick View. $this->quick_view_content_actions(); add_action( 'wp_ajax_astra_add_cart_single_product', array( $this, 'astra_add_cart_single_product_ajax' ) ); add_action( 'wp_ajax_nopriv_astra_add_cart_single_product', array( $this, 'astra_add_cart_single_product_ajax' ) ); // Register Off Canvas Sidebars. add_action( 'widgets_init', array( $this, 'shop_filters_sidebar' ), 15 ); add_action( 'astra_body_bottom', array( $this, 'get_off_canvas_sidebar' ) ); // Addon meta option. add_action( 'wp', array( $this, 'addons_meta_options' ) ); add_filter( 'astra_addon_js_localize', array( $this, 'localize_variables_shop_page' ) ); // Advanced header bg image. add_filter( 'astra_advanced_headers_title_bar_bg', array( $this, 'category_featured_image' ), 10, 2 ); add_shortcode( 'astra_woo_mini_cart', array( $this, 'astra_woo_mini_cart_markup' ) ); // Load Google fonts. add_action( 'astra_get_fonts', array( $this, 'add_fonts' ), 1 ); }
Expand full source code Collapse full source code View on Trac