• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/woocommerce/templates/content-widget-product.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
     
    1
    <?php
    2
    /**
    3
     * The template for displaying product widget entries.
    4
     *
    5
     * This template can be overridden by copying it to yourtheme/woocommerce/content-widget-product.php.
    6
     * HOWEVER, on occasion WooCommerce will need to update template files and you
    7
     * (the theme developer) will need to copy the new files to your theme to
    8
     * maintain compatibility. We try to do this as little as possible, but it does
    9
     * happen. When this occurs the version of the template file will be bumped and
    10
     * the readme will list any important changes.
    11
     *
    12
     * @see     https://docs.woocommerce.com/document/template-structure/
    13
     * @package WooCommerce\Templates
    14
     * @version 3.5.5
    15
     */
    16
    ​
    17
    if ( ! defined( 'ABSPATH' ) ) {
    18
        exit;
    19
    }
    20
    ​
    21
    global $product;
    22
    ​
    23
    if ( ! is_a( $product, 'WC_Product' ) ) {
    24
        return;
    25
    }
    26
    ​
    27
    ?>
    28
    <li>
    29
        <?php do_action( 'woocommerce_widget_product_item_start', $args ); ?>
    30
    ​
    31
        <a href="<?php echo esc_url( $product->get_permalink() ); ?>">
    32
            <?php echo $product->get_image(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    33
            <span class="product-title"><?php echo wp_kses_post( $product->get_name() ); ?></span>
    34
        </a>
    35
    ​
    36
        <?php if ( ! empty( $show_rating ) ) : ?>
    37
            <?php echo wc_get_rating_html( $product->get_average_rating() ); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    38
        <?php endif; ?>
    39
    ​
    40
        <?php echo $product->get_price_html(); // PHPCS:Ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
    41
    ​
    42
        <?php do_action( 'woocommerce_widget_product_item_end', $args ); ?>
    43
    </li>
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.