| Server IP : 198.38.94.67 / Your IP : 216.73.217.74 Web Server : LiteSpeed System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64 User : azfilmst ( 1070) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/azfilmst/www/wp-content/themes/frames/woocommerce/loop/ |
Upload File : |
<?php
/**
* Compare button template - Loop Layout
*
* @author Your Inspiration Themes
* @package YITH WooCommerce Compare
* @version 3.0.0
*/
if ( ! class_exists( 'YITH_Woocompare' ) ) {
exit;
} //
$haru_product_add_to_compare = haru_get_option( 'haru_product_add_to_compare', '1' );
if ( $haru_product_add_to_compare == '0' ) {
return;
}
?>
<?php if ( is_plugin_active( 'yith-woocommerce-compare/init.php' ) ) : ?>
<?php
if ( class_exists( 'YITH_Woocompare' ) ) {
global $yith_woocompare, $product;
$is_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
if ( $yith_woocompare->is_frontend() || $is_ajax ) {
if ( $is_ajax ) {
// @TODO: update woocommerce cause this doesn't work: $yith_woocompare->obj = new YITH_Woocompare_Frontend();
}
if ( wp_is_mobile() ) {
return;
}
echo '<div class="product-button product-button--compare">';
echo '<a class="compare button" href="' . esc_url( $yith_woocompare->obj->add_product_url( $product->get_id() ) ) . '" data-product_id="' . $product->get_id() .'" rel="nofollow" data-tooltip_text="'. esc_html( 'Compare', 'frames') . '">'.'<span class="haru-tooltip button-tooltip">' . get_option('yith_woocompare_button_text') . '</span></a>';
echo '</div>';
}
}
?>
<?php endif; ?>