WC_Shortcodes::shortcode_wrapper()
Shortcode Wrapper.
Method of the class: WC_Shortcodes{}
No Hooks.
Return
String
.
Usage
$result = WC_Shortcodes::shortcode_wrapper(;
WC_Shortcodes::shortcode_wrapper() WC Shortcodes::shortcode wrapper code WC 9.7.1
public static function shortcode_wrapper( $function, $atts = array(), $wrapper = array( 'class' => 'woocommerce', 'before' => null, 'after' => null, ) ) { ob_start(); // @codingStandardsIgnoreStart echo empty( $wrapper['before'] ) ? '<div class="' . esc_attr( $wrapper['class'] ) . '">' : $wrapper['before']; call_user_func( $function, $atts ); echo empty( $wrapper['after'] ) ? '</div>' : $wrapper['after']; // @codingStandardsIgnoreEnd return ob_get_clean(); }