Skip to content

Commit

Permalink
WC 2.1 Compatibility Method
Browse files Browse the repository at this point in the history
New 2.1 compatibility method to get template path
  • Loading branch information
justinstern committed Feb 8, 2014
1 parent 2977e19 commit 68b4dc9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions woocommerce/class-sv-wc-plugin-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,23 @@ public static function wc_trim_zeroes( $price ) {
}


/**
* Get the template path
*
* @since 2.0.2
* @return string template path
*/
public static function template_path() {

if ( self::is_wc_version_gte_2_1() ) {
return WC()->template_path();
} else {
global $woocommerce;
return $woocommerce->template_url;
}
}


/**
* Compatibility function to get the version of the currently installed WooCommerce
*
Expand Down

0 comments on commit 68b4dc9

Please sign in to comment.