PluginProbe ʕ •ᴥ•ʔ
Slider Ultimate / 2.2.10
Slider Ultimate v2.2.10
2.2.10 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9
ultimate-slider / includes / WooCommerceIntegration.class.php
ultimate-slider / includes Last commit date
AboutUs.class.php 3 years ago BackwardsCompatibility.class.php 4 years ago Blocks.class.php 4 years ago CustomPostTypes.class.php 2 years ago Dashboard.class.php 3 years ago DeactivationSurvey.class.php 1 month ago Helper.class.php 4 years ago InstallationWalkthrough.class.php 4 years ago Permissions.class.php 4 years ago ReviewAsk.class.php 4 years ago Settings.class.php 2 years ago Widgets.class.php 4 years ago WooCommerceIntegration.class.php 4 years ago template-functions.php 2 years ago
WooCommerceIntegration.class.php
49 lines
1 <?php
2
3 /**
4 * Class to replace the main WooCommerce product image with a slider
5 * that contains all of the product images
6 */
7
8 if ( !defined( 'ABSPATH' ) )
9 exit;
10
11 class ewdusWooCommerceIntegration {
12
13
14 public function __construct() {
15
16 add_filter( 'woocommerce_locate_template', array( $this, 'add_plugin_template' ), 1, 3 );
17 }
18
19 public function add_plugin_template( $template, $template_name, $template_path ) {
20 global $woocommerce;
21
22 $_template = $template;
23
24 if ( ! $template_path ) {
25
26 $template_path = $woocommerce->template_url;
27 }
28
29 $plugin_path = EWD_US_PLUGIN_DIR . '/woocommerce-templates/';
30
31 if ( file_exists( $plugin_path . $template_name ) ) {
32
33 $template = $plugin_path . $template_name;
34 }
35
36 if ( ! $template ) {
37
38 $paths = array(
39 $template_path . $template_name,
40 $template_name
41 );
42
43 $template = locate_template( $paths );
44 }
45
46
47 return $template;
48 }
49 }