Skip to content

Commit 664f7f4

Browse files
committed
Revert "Revert "Basic WooCommere support""
This reverts commit fe11a69.
1 parent fe11a69 commit 664f7f4

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

functions.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,3 +487,32 @@ function origami_wp_header(){
487487

488488
}
489489
add_action('wp_head', 'origami_wp_header');
490+
491+
function origami_woocommerce_setup() {
492+
493+
/**
494+
* Add support for WooCommerce.
495+
* @link https://docs.woocommerce.com/document/declare-woocommerce-support-in-third-party-theme/
496+
*/
497+
add_theme_support( 'woocommerce' );
498+
499+
/**
500+
* Add support for WooCommerce galleries.
501+
* @link https://woocommerce.wordpress.com/2017/02/28/adding-support-for-woocommerce-2-7s-new-gallery-feature-to-your-theme/
502+
*/
503+
add_theme_support( 'wc-product-gallery-slider' );
504+
add_theme_support( 'wc-product-gallery-lightbox' );
505+
add_theme_support( 'wc-product-gallery-zoom' );
506+
507+
}
508+
add_action( 'after_setup_theme', 'origami_woocommerce_setup' );
509+
510+
/**
511+
* Enqueue WooCommerce scripts and styles.
512+
*/
513+
function origami_woocommerce_scripts() {
514+
515+
wp_enqueue_style( 'origami-woocommerce-style', get_template_directory_uri() . '/woocommerce.css', array(), SITEORIGIN_THEME_VERSION );
516+
517+
}
518+
add_action( 'wp_enqueue_scripts', 'origami_woocommerce_scripts' );

style.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)