This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Hook for reactivation from 'on-hold' to 'active' | |
add_action('woocommerce_subscription_status_on-hold_to_active', 'send_custom_email_on_reactivation', 10, 1); | |
function send_custom_email_on_reactivation($subscription) { | |
$user_email = $subscription->get_billing_email(); | |
// Optional: Check if this is an admin reactivation | |
if (is_admin() && current_user_can('manage_woocommerce')) { | |
$action = 'admin reactivated'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the cross-sells displayed in the cart to always show specific products. | |
*/ | |
function custom_filter_woocommerce_cart_cross_sells( $cross_sell_ids, $cart ) { | |
// Specify the IDs of the products you want to always show as cross-sells. | |
$custom_cross_sell_ids = array( '1', '2' ); | |
// Return your custom cross-sell product IDs. | |
return $custom_cross_sell_ids; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (min-width: 768px) { | |
.site-main ul.products li.product, .smm-mega-menu ul.products li.product { | |
overflow: visible; | |
} | |
.site-main ul.products li.product .button, | |
.site-main ul.products li.product .g-product-title, | |
.smm-mega-menu ul.products li.product .button, | |
.smm-mega-menu ul.products li.product .g-product-title { | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Add following snippet to "Header & Footers WordPress Plugin. Replace wc.local with your own website URL --> | |
<link rel='stylesheet' id='select2-css' href='https://wc.local/wp-content/plugins/woocommerce/assets/css/select2.css?ver=4.6.1' media='all' /> | |
<script src="https://wc.local/wp-content/plugins/woocommerce/assets/js/selectWoo/selectWoo.full.min.js?ver=1.0.6" id="selectWoo-js"></script> | |
<script> | |
jQuery( document ).ready( | |
function ($) { | |
$( '.wc-pao-addon-select' ).filter( ':not(.enhanced)' ).each( | |
function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'wc_stripe_supported_countries', 'wc_stripe_CN_support', 10, 1 ); | |
function wc_stripe_CN_support( $supported_countries ) { | |
$supported_countries = array( | |
'CN', // China | |
); | |
return $supported_countries; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.main-navigation ul.menu ul li:hover>a, | |
.main-navigation ul.nav-menu ul li:hover>a { | |
background-color: #ff2b71; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.site-main ul.products li.product, .smm-mega-menu ul.products li.product { | |
overflow: visible; | |
} | |
.site-main ul.products li.product .button, | |
.site-main ul.products li.product .g-product-title, | |
.smm-mega-menu ul.products li.product .button, | |
.smm-mega-menu ul.products li.product .g-product-title { | |
display: block; | |
opacity: 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('storefront_product_categories_shortcode_args','custom_storefront_category_per_page' ); | |
// Category Products | |
function custom_storefront_category_per_page( $args ) { | |
$args['number'] = 10; | |
$args['orderby'] = 'name'; | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('storefront_featured_products_args','custom_storefront_featured_product_order' ); | |
// Featured Products Order | |
function custom_storefront_featured_product_order( $args ) { | |
$args['orderby'] = 'title; | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.page-template-template-homepage.has-post-thumbnail .type-page.has-post-thumbnail { | |
padding-top: 0; | |
padding-bottom: 0; | |
margin: 0; | |
} |
NewerOlder