frontend-product.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. if (!defined('WPINC')) {
  3. die;
  4. }
  5. /** @var WC_Product_Variable $product */
  6. /** @var int $max_file_size */
  7. $product_id = $product->get_id();
  8. ?>
  9. <div class="studiou-fpp-product">
  10. <div class="studiou-fpp-product-header">
  11. <?php if ($product->get_image_id()) : ?>
  12. <div class="studiou-fpp-product-image">
  13. <?php echo $product->get_image('woocommerce_thumbnail'); ?>
  14. </div>
  15. <?php endif; ?>
  16. <div class="studiou-fpp-product-info">
  17. <h2 class="studiou-fpp-product-title"><?php echo esc_html($product->get_name()); ?></h2>
  18. <?php if ($product->get_short_description()) : ?>
  19. <div class="studiou-fpp-product-description">
  20. <?php echo wp_kses_post($product->get_short_description()); ?>
  21. </div>
  22. <?php endif; ?>
  23. </div>
  24. </div>
  25. <?php
  26. // Render WooCommerce native product form (includes variation selectors + add to cart)
  27. // The upload area is injected via woocommerce_before_add_to_cart_button hook
  28. ?>
  29. <div class="studiou-fpp-section">
  30. <?php woocommerce_variable_add_to_cart(); ?>
  31. </div>
  32. </div>