Site icon Hip-Hop Website Design and Development

How can the alt be added to this wooCommerce class picture?

I’m making an attempt to get the alt to show as it’s written inside the media library, however the essential code edit is past my comprehension. The code beneath was created to switch wooCommerce. One of the best I might do now’s to slender down right here the edit must happen. This line is one which wants edited, however I’m unsure what to alter:

if ($picture) echo '<img src="' . esc_url($picture) .'" alt="EDIT HERE:plugins>woocommerce-CJD">';

Any assist exhibiting me methods to get the alt tag to show could be significantly appreciated! Thanks

if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

add_action('after_setup_theme', 'WC_CJD_tweak_action_hooks');
operate WC_CJD_tweak_action_hooks () {
    // put sorting earlier than class checklist
    remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 30 );
    remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 );
    add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
    add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
}



// add breadcrumb
add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 1 );
add_filter( 'woocommerce_breadcrumb_defaults', 'WC_CJD_modify_breadcrumb' );
operate WC_CJD_modify_breadcrumb ($defaults) {
    $defaults['delimiter'] = '';
    return $defaults;
}

// add class header space with picture
add_action('woocommerce_archive_description', 'WC_CJD_wrap_cat_descr_open', 2);
add_action('woocommerce_archive_description', 'WC_CJD_wrap_cat_descr_close', 99);
operate WC_CJD_wrap_cat_descr_open () {
    if (is_product_category()) {
        international $wp_query;
        $cat = $wp_query->get_queried_object();
        $thumbnail_id = intval(get_woocommerce_term_meta($cat->term_id, 'thumbnail_id', true));
        $picture = wp_get_attachment_image_url($thumbnail_id, 'shop_catalog');
        echo '<div class="cat-header">';
        if ($picture) echo '<img class="cat-header-bg" src="' . esc_url($picture) . '" alt="" />';
        echo '<div class="cat-header-content">';
        echo '<div class="cat-header-text">';
        echo '<h1> Wholesale ' . $cat->identify . ' </h1>';
    }
}
operate WC_CJD_wrap_cat_descr_close () {
    if (is_product_category()) {
        international $wp_query;
        $cat = $wp_query->get_queried_object();
        $thumbnail_id = intval(get_woocommerce_term_meta($cat->term_id, 'thumbnail_id', true));
        $picture = wp_get_attachment_image_url($thumbnail_id, 'shop_catalog');

        echo '</div>';
        if ($picture) echo '<img src="' . esc_url($picture) .'" alt="EDIT HERE:plugins>woocommerce-CJD">';
        echo '</div>';
        echo '</div>';
    }
}