function wc2_get_current_slug(){ $wc2_public = WC2_Public::get_instance(); return $wc2_public->page->get_current_slug(); }
/** * Return an instance of this class. * * @since 1.0.0 * * @return object A single instance of this class. */ public static function get_instance() { // If the single instance hasn't been set, set it now. if ( null == self::$instance ) { self::$instance = new self; } return self::$instance; }