Plugin Directory

Changeset 3102737

Timestamp:
06/14/2024 11:53:33 AM (6 weeks ago)
Author:
snapplify
Message:

Product image placeholder override fix.
Product image override refactoring.

Location:
snapplify-e-commerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • snapplify-e-commerce/trunk/includes/class-snapplify-ecommerce.php

    r2919131 r3102737  
    191191        // display product image from cloud server
    192192        $this->loader->add_filter('woocommerce_single_product_image_thumbnail_html', $plugin_public, 'wcsnapplify_product_image_from_cloud', 10, 2);
    193         $this->loader->add_filter('woocommerce_placeholder_img', $plugin_public, 'wcsnapplify_product_loop_image_from_cloud', 2);
    194         $this->loader->add_filter('woocommerce_before_shop_loop_item_title', $plugin_public, 'wcsnapplify_product_loop_image_from_cloud', 1);
     193        $this->loader->add_filter('woocommerce_placeholder_img', $plugin_public, 'wcsnapplify_product_);
     194        $this->loader->add_filter('woocommerce_before_shop_loop_item_title', $plugin_public, 'wcsnapplify_product_loop_image_from_cloud', 1);
    195195        $this->loader->add_filter('woocommerce_cart_item_thumbnail', $plugin_public, 'wcsnapplify_cart_product_image_from_cloud', 10, 3);
    196196        $this->loader->add_filter('woocommerce_order_item_thumbnail', $plugin_public, 'wcsnapplify_order_item_image_from_cloud', 10, 2);
  • snapplify-e-commerce/trunk/public/class-snapplify-ecommerce-public.php

    r2919109 r3102737  
    141141    }
    142142
     143
     144
     145
     146
     147
     148
     149
     150
     151
     152
     153
    143154    public function wcsnapplify_product_loop_image_from_cloud()
    144155    {
     
    150161        }
    151162        if (!$newImageHtml) {
    152             if ( has_post_thumbnail()) {     
     163            if ( has_post_thumbnail()) {
     164                global $product;
    153165                $image_html = get_the_post_thumbnail( $product->post->ID, $size );
    154166            }else{
    155167                $image_html = wc_placeholder_img( $size );
    156             }             
     168            }
    157169            $newImageHtml = $image_html;
    158170        }
  • snapplify-e-commerce/trunk/snapplify-ecommerce.php

    r2919109 r3102737  
    1212 * Plugin URI:        https://www.snapplify.com/snapplify-ecommerce
    1313 * Description:       Offer Snapplify products in your WooCommerce Store that can be redeemed using a voucher.
    14  * Version:           1.0.8
     14 * Version:           1.0.
    1515 * Author:            Snapplify
    1616 * Author URI:        https://snapplify.com
     
    2525    die;
    2626}
    27 
    28 /**
    29  * Currently plugin version.
    30  * Start at version 1.0.0 and use SemVer - https://semver.org
    31  */
    32 define('SNAPPLIFY_ECOMMERCE_VERSION', '1.0.6');
    3327
    3428require_once plugin_dir_path(__FILE__) . 'vendor/autoload.php';
     
    6256
    6357/**
    64  * Include processing pipeline logic.
    65  */
    66 
    67 require_once plugin_dir_path(__FILE__) . '../woocommerce/packages/action-scheduler/action-scheduler.php';
    68 
    69 
    70 
    71 /**
    7258 * The core plugin class that is used to define internationalization,
    7359 * admin-specific hooks, and public-facing site hooks.
Note: See TracChangeset for help on using the changeset viewer.