This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get WooCommerce random product ratings via shortcode: [iw_random_ratings] | |
| function iw_random_ratings_shortcode( $atts ) { | |
| extract( shortcode_atts( array( | |
| 'author__not_in' => '', | |
| 'number' => '5', | |
| 'author' => 'show', | |
| 'object' => 'show' | |
| ), $atts ) ); | |
| $args = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get WooCommerce product attributes by ID via shortcode: [iw_product_attributes id=''] | |
| function iw_product_attributes_shortcode( $atts ) { | |
| $atts = shortcode_atts( array( | |
| 'id' => null, | |
| ), $atts, 'bartag' ); | |
| if( intval( $atts['id'] ) > 0 && function_exists( 'wc_get_product' ) ){ | |
| $_product = wc_get_product( $atts['id'] ); | |
| if( $_product->has_attributes() ){ |
OlderNewer