plugins_url( 'assets/js/flexslider/jquery.flexslider.min.js', WC_PLUGIN_FILE ), 'deps' => array( 'jquery' ) ); } if ( current_theme_supports( 'wc-product-gallery-lightbox' ) ) { $register_styles = array( 'photoswipe' => array( 'src' => plugins_url( 'assets/css/photoswipe/photoswipe.min.css', WC_PLUGIN_FILE ), 'deps' => array() ), 'photoswipe-default-skin' => array( 'src' => plugins_url( 'assets/css/photoswipe/default-skin/default-skin.min.css', WC_PLUGIN_FILE ), 'deps' => array( 'photoswipe' ) ) ); foreach ( $register_styles as $name => $props ) { wp_enqueue_style( $name, $props['src'], $props['deps'], BOTIGA_VERSION ); } $register_scripts['photoswipe'] = array( 'src' => plugins_url( 'assets/js/photoswipe/photoswipe.min.js', WC_PLUGIN_FILE ), 'deps' => array() ); $register_scripts['photoswipe-ui-default'] = array( 'src' => plugins_url( 'assets/js/photoswipe/photoswipe-ui-default.min.js', WC_PLUGIN_FILE ), 'deps' => array( 'photoswipe' ) ); } $register_scripts['wc-single-product'] = array( 'src' => plugins_url( 'assets/js/frontend/single-product.min.js', WC_PLUGIN_FILE ), 'deps' => array( 'jquery' ) ); if ( current_theme_supports( 'wc-product-gallery-zoom' ) ) { $register_scripts['zoom'] = array( 'src' => plugins_url( 'assets/js/zoom/jquery.zoom.min.js', WC_PLUGIN_FILE ), 'deps' => array( 'jquery' ) ); } // Enqueue variation scripts. $register_scripts['wc-add-to-cart-variation'] = array( 'src' => plugins_url( 'assets/js/frontend/add-to-cart-variation.min.js', WC_PLUGIN_FILE ), 'deps' => array( 'jquery', 'wp-util', 'jquery-blockui' ) ); foreach ( $register_scripts as $name => $props ) { wp_enqueue_script( $name, $props['src'], $props['deps'], BOTIGA_VERSION ); } } /** * Quick view button * * @param bool $product_id * @param bool $echo * @param string $block_layout Layout from gutenberg and elementor blocks. * * @return string */ function botiga_quick_view_button( $product = false, $echo = true, $block_layout = 'layout1' ) { if( $product == false ) { global $product; } $product_id = $product->get_id(); $quick_view_layout = get_theme_mod( 'shop_product_quickview_layout', 'layout1' ); if( 'layout1' === $quick_view_layout ) { if( 'layout1' === $block_layout ) { return ''; } } if( $echo == false ) { ob_start(); } ?>
absint( $_POST['product_id'] ) ); botiga_get_template_part( 'template-parts/content', 'quick-view', $args ); wp_die(); } add_action( 'wp_ajax_botiga_quick_view_content', 'botiga_quick_view_content_callback_function' ); add_action( 'wp_ajax_nopriv_botiga_quick_view_content', 'botiga_quick_view_content_callback_function' ); /** * Quick View Summary Title */ function botiga_quick_view_summary_title( $product = null ) { ?>get_price_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
get_short_description() ); if ( $short_description ) : ?>get_price_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>