Няма описание

cart-empty.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Empty cart page
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-empty.php.
  6. *
  7. * HOWEVER, on occasion WooCommerce will need to update template files and you
  8. * (the theme developer) will need to copy the new files to your theme to
  9. * maintain compatibility. We try to do this as little as possible, but it does
  10. * happen. When this occurs the version of the template file will be bumped and
  11. * the readme will list any important changes.
  12. *
  13. * @see https://docs.woocommerce.com/document/template-structure/
  14. * @package WooCommerce\Templates
  15. * @version 3.5.0
  16. */
  17. defined( 'ABSPATH' ) || exit;
  18. /*
  19. * @hooked wc_empty_cart_message - 10
  20. */
  21. do_action( 'woocommerce_cart_is_empty' );
  22. if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
  23. <p class="return-to-shop">
  24. <a class="button wc-backward" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
  25. <?php
  26. /**
  27. * Filter "Return To Shop" text.
  28. *
  29. * @since 4.6.0
  30. * @param string $default_text Default text.
  31. */
  32. echo esc_html( apply_filters( 'woocommerce_return_to_shop_text', __( 'Return to shop', 'woocommerce' ) ) );
  33. ?>
  34. </a>
  35. </p>
  36. <?php endif; ?>