'350', // px 'height' => '453', // px 'crop' => 1 // true ); $single = array( 'width' => '570', // px 'height' => '708', // px 'crop' => 1 // true ); $thumbnail = array( 'width' => '350', // px 'height' => '453', // px 'crop' => 0 // false ); // Image sizes update_option( 'shop_catalog_image_size', $catalog ); // Product category thumbs update_option( 'shop_single_image_size', $single ); // Single product image update_option( 'shop_thumbnail_image_size', $thumbnail ); // Image gallery thumbs } /** * Set Default Thumbnail Sizes for Woo Commerce Product Pages, on Theme Activation */ global $pagenow; if ( is_admin() && isset( $_GET['activated'] ) && $pagenow == 'themes.php' ) { add_action( 'init', 'shapely_woocommerce_image_dimensions', 1 ); } } /* * Add basic WooCommerce template support * */ // First let's remove original WooCommerce wrappers remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); // Now we can add our own, the same used for theme Pages add_action( 'woocommerce_before_main_content', 'shapely_wrapper_start', 10 ); add_action( 'woocommerce_after_main_content', 'shapely_wrapper_end', 10 ); if ( ! function_exists( 'shapely_wrapper_start' ) ) { /** * */ function shapely_wrapper_start() { $layout_class = ( function_exists( 'shapely_get_layout_class' ) ) ? shapely_get_layout_class() : ''; echo '