shortcode_wrapper() public static method

Shortcode Wrapper.
public static shortcode_wrapper ( string[] $function, array $atts = [], $wrapper = ['class' => 'woocommerce', 'before' => null, 'after' => null] ) : string
$function string[]
$atts array (default: array())
return string
 /**
  * Get the shortcode content.
  *
  * @access public
  * @param array $atts
  * @return string
  */
 public static function get($atts)
 {
     return WC_Shortcodes::shortcode_wrapper(array(__CLASS__, 'output'), $atts);
 }
Beispiel #2
0
 /**
  * @deprecated 2.1.0
  * @param       $function
  * @param array $atts
  * @param array $wrapper
  * @return string
  */
 public function shortcode_wrapper($function, $atts = array(), $wrapper = array('class' => 'woocommerce', 'before' => null, 'after' => null))
 {
     _deprecated_function('Woocommerce->shortcode_wrapper', '2.1', 'WC_Shortcodes::shortcode_wrapper');
     return WC_Shortcodes::shortcode_wrapper($function, $atts, $wrapper);
 }
 /**
  * Pricing table shortcode: renders a table of product prices
  *
  * @since 3.0
  * @param array $atts associative array of shortcode parameters
  * @return string shortcode content
  */
 public function pricing_table_shortcode($atts)
 {
     require_once 'classes/shortcodes/class-wc-price-calculator-shortcode-pricing-table.php';
     return WC_Shortcodes::shortcode_wrapper(array('WC_Price_Calculator_Shortcode_Pricing_Table', 'output'), $atts, array('class' => 'wc-measurement-price-calculator'));
 }
 /**
  * Add the gateway to woocommerce
  */
 function get_woocommerce_review_order_angelleye($atts)
 {
     global $woocommerce;
     return WC_Shortcodes::shortcode_wrapper(array($this, 'woocommerce_review_order_angelleye'), $atts);
 }
 /**
  * Get shortcode content
  *
  * @access public
  * @param array $atts
  * @return string
  * 
  */
 public static function get($atts)
 {
     global $woocommerce;
     return WC_Shortcodes::shortcode_wrapper(array(__CLASS__, 'output'), $atts);
 }
 /**
  * Get the shortcode content
  *
  * @since 3.0
  * @param array $atts associative array of shortcode parameters
  * @return string shortcode content
  */
 public static function get($atts)
 {
     return WC_Shortcodes::shortcode_wrapper(array(__CLASS__, 'output'), $atts, array('class' => 'wc-measurement-price-calculator'));
 }
 /**
  * WooCommerce Shortcode wrapper
  *
  * @since 2.0
  * @param mixed $function shortcode callback
  * @param array $atts (default: array())
  * @param array $wrapper array of wrapper options (class, before, after)
  * @return string
  */
 public static function shortcode_wrapper($function, $atts = array(), $wrapper = array('class' => 'woocommerce', 'before' => null, 'after' => null))
 {
     if (self::is_wc_version_gte_2_1()) {
         return WC_Shortcodes::shortcode_wrapper($function, $atts, $wrapper);
     } else {
         global $woocommerce;
         return $woocommerce->shortcode_wrapper($function, $atts, $wrapper);
     }
 }
Beispiel #8
0
 /**
  * Intercept and replace woocommerce_my_account shortcode
  * 
  * @access public
  * @param array $atts
  * @return void
  */
 public function intercept_woocommerce_my_account_shortcode($atts)
 {
     return WC_Shortcodes::shortcode_wrapper(array('Subscriptio_My_Account', 'output'), $atts);
 }
Beispiel #9
0
function get_swr_view_rewards($atts)
{
    global $woocommerce;
    if (version_compare($woocommerce->version, '2.1.0') >= 0) {
        return WC_Shortcodes::shortcode_wrapper('get_swr_wrapper_view_rewards', $atts);
    } else {
        return $woocommerce->shortcode_wrapper('get_swr_wrapper_view_rewards', $atts);
    }
}
 /**
  *  Shortcode for my auctions
  *
  * @access public
  * @param  array
  * @return 
  * 
  */
 function shortcode_my_auctions($atts)
 {
     global $woocommerce;
     return WC_Shortcodes::shortcode_wrapper(array('WC_Shortcode_Simple_Auction_My_Auctions', 'output'), $atts);
 }