ASTRA_Ext_WooCommerce_Markup::single_product_customization()
Single product customization.
Description
Return
(void)
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function single_product_customization() {
if ( ! is_product() ) {
return;
}
if ( ! astra_get_option( 'single-product-image-zoom-effect' ) ) {
remove_theme_support( 'wc-product-gallery-zoom' );
}
if ( 'disable' != astra_get_option( 'single-product-nav-style' ) ) {
add_action( 'woocommerce_single_product_summary', array( $this, 'product_navigation_wrapper_start' ), 1, 0 );
add_action( 'woocommerce_single_product_summary', array( $this, 'next_previous_links' ), 1, 0 );
add_action( 'woocommerce_single_product_summary', array( $this, 'product_navigation_wrapper_end' ), 1, 0 );
}
// Breadcrumb.
if ( astra_get_option( 'single-product-breadcrumb-disable' ) ) {
remove_action( 'woocommerce_single_product_summary', 'woocommerce_breadcrumb', 2 );
}
// Remove Default actions.
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
/* Add single product content */
add_action( 'woocommerce_single_product_summary', array( $this, 'single_product_content_structure' ), 10 );
if ( ! astra_get_option( 'single-product-tabs-display' ) ) {
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
}
/* Display Related Products */
if ( ! astra_get_option( 'single-product-related-display' ) ) {
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
}
/* Display Up sell Products */
if ( ! astra_get_option( 'single-product-up-sells-display' ) ) {
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
}
}
Expand full source code Collapse full source code View on Trac