Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Change video aspect ratio for WooCoomerce products
- * @param array $options - post video options
- * @param int $post_id - current post ID being displayed
- * @return array
- */
- function cvwp_hl_change_aspect( $options, $post_id ){
- if( class_exists('WooCommerce') && is_product() ){
- $options['video']['aspect'] = '1x1';
- }
- return $options;
- }
- add_filter( 'cvwp_get_post_options', 'cvwp_hl_change_aspect', 10, 2 );
Add Comment
Please, Sign In to add comment