Skip to content

Commit

Permalink
Merge pull request woocommerce#1173 from franticpsyx/sw-product-recom…
Browse files Browse the repository at this point in the history
…mendations-combatibility

Add integration/support for WooCommerce Product Recommendations extension
  • Loading branch information
tiagonoronha authored Jul 3, 2019
2 parents 251db93 + be9f40e commit 29cc284
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ module.exports = function( grunt ) {
'assets/css/woocommerce/extensions/mix-and-match.css': 'assets/css/woocommerce/extensions/mix-and-match.scss',
'assets/css/woocommerce/extensions/memberships.css': 'assets/css/woocommerce/extensions/memberships.scss',
'assets/css/woocommerce/extensions/quick-view.css': 'assets/css/woocommerce/extensions/quick-view.scss',
'assets/css/woocommerce/extensions/product-recommendations.css': 'assets/css/woocommerce/extensions/product-recommendations.scss',
'assets/css/woocommerce/woocommerce.css': 'assets/css/woocommerce/woocommerce.scss',
'assets/css/woocommerce/woocommerce-legacy.css': 'assets/css/woocommerce/woocommerce-legacy.scss',
'assets/css/jetpack/infinite-scroll.css': 'assets/css/jetpack/infinite-scroll.scss',
Expand Down Expand Up @@ -422,6 +423,7 @@ module.exports = function( grunt ) {
'assets/css/woocommerce/extensions/mix-and-match.css',
'assets/css/woocommerce/extensions/memberships.css',
'assets/css/woocommerce/extensions/quick-view.css',
'assets/css/woocommerce/extensions/product-recommendations.css',
'assets/css/woocommerce/woocommerce.css',
'assets/css/woocommerce/woocommerce-legacy.css',
'assets/css/admin/welcome-screen/welcome.css',
Expand Down
50 changes: 50 additions & 0 deletions assets/css/woocommerce/extensions/product-recommendations.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* WooCommerce Product Recommendations
*/

/**
* Imports
*/

@import 'bourbon';
@import '../../sass/utils/variables';
@import '../../sass/utils/mixins';
@import '../../../../node_modules/susy/sass/susy';
@import '../../sass/vendors/modular-scale';

/**
* Base
*/
.wc-prl-recommendations {

h2 {
font-size: ms(3);
}

&.wc-prl-page-product_details {

&.wc-prl-location-before_tabs,
&.wc-prl-location-after_tabs {

h2 {
margin-bottom: ms(1);
text-align: center;
}
}

&.wc-prl-location-after_summary {
margin-top: ms(2);
}
}

&.wc-prl-location-after_pay_button {
margin-top: ms(2);
}

&.wc-prl-page-checkout {

&.wc-prl-location-order_review {
margin-top: ms(5);
}
}
}
8 changes: 8 additions & 0 deletions inc/woocommerce/class-storefront-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ public function woocommerce_integrations_scripts() {
if ( $this->is_woocommerce_extension_activated( 'WC_Checkout_Add_Ons' ) ) {
add_filter( 'storefront_sticky_order_review', '__return_false' );
}

/**
* WooCommerce Product Recommendations
*/
if ( $this->is_woocommerce_extension_activated( 'WC_Product_Recommendations' ) ) {
wp_enqueue_style( 'storefront-woocommerce-product-recommendations-style', get_template_directory_uri() . '/assets/css/woocommerce/extensions/product-recommendations.css', 'storefront-woocommerce-style', $storefront_version );
wp_style_add_data( 'storefront-woocommerce-product-recommendations-style', 'rtl', 'replace' );
}
}

/**
Expand Down

0 comments on commit 29cc284

Please sign in to comment.