Initial Commit N° : 003 - V.4.3.5

This commit is contained in:
2025-03-28 14:51:03 +01:00
parent 579b475021
commit 1ec9986b28
78 changed files with 1974 additions and 10329 deletions
+13 -1
View File
@@ -823,7 +823,7 @@ if (!function_exists('elessi_ct_product_grid_btns')) :
/**
* Product Card Styles - style 4 | modern-2
*/
if ($nasa_opt['loop_layout_buttons'] == 'modern-2') {
if (in_array($nasa_opt['loop_layout_buttons'], array('modern-2', 'modern-10'))) {
remove_action('nasa_show_buttons_loop', 'woocommerce_template_loop_add_to_cart', 10);
if (
@@ -833,6 +833,18 @@ if (!function_exists('elessi_ct_product_grid_btns')) :
add_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_add_to_cart', 100);
add_action('nasa_after_special_deal_simple_action', 'woocommerce_template_loop_add_to_cart', 100);
}
/**
* rating in loop - case modern-10
*/
if ($nasa_opt['loop_layout_buttons'] == 'modern-10') {
add_filter('woocommerce_get_star_rating_html', function($html, $rating, $count) {
$html = '<span style="width:' . ( ( $rating / 5 ) * 80 ) . 'px"></span>';
$html .= '<span class="rating hidden-tag">(' . esc_html( $rating ) . ')</span>';
return $html;
}, 10, 3);
}
}
/**