Guest User

Untitled

a guest
Jun 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. /**
  2. * Change video aspect ratio for WooCoomerce products
  3. * @param array $options - post video options
  4. * @param int $post_id - current post ID being displayed
  5. * @return array
  6. */
  7. function cvwp_hl_change_aspect( $options, $post_id ){
  8. if( class_exists('WooCommerce') && is_product() ){
  9. $options['video']['aspect'] = '1x1';
  10. }
  11. return $options;
  12. }
  13. add_filter( 'cvwp_get_post_options', 'cvwp_hl_change_aspect', 10, 2 );
Add Comment
Please, Sign In to add comment