This file contains hidden or 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
| function wc_ninja_remove_password_strength() { | |
| if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) { | |
| wp_dequeue_script( 'wc-password-strength-meter' ); | |
| } | |
| } | |
| add_action( 'wp_print_scripts', 'wc_ninja_remove_password_strength', 100 ); |
This file contains hidden or 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
| // change output $args in variation swatches | |
| function change_class_or_id( $args ) { | |
| $args = array( | |
| 'options' => false, | |
| 'attribute' => false, | |
| 'product' => false, | |
| 'selected' => false, | |
| 'name' => '', | |
| 'id' => 'testyyy', | |
| 'class' => 'test', |
This file contains hidden or 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
| /** | |
| * Creates a shortcode to output the "My Memberships" table anywhere on the site | |
| * Outputs this section only if the current user has 1 or more memberships | |
| * | |
| * Use the shortcode: [wcm_my_memberships] | |
| */ | |
| function sv_wc_memberships_my_memberships_shortcode() { | |
| // buffer contents | |
| ob_start(); |
This file contains hidden or 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 | |
| // Remove the <?php tag above if your file already includes it | |
| // Remove Sale price from products when using Dynamic Pricing | |
| function marce_remove_sale_dynamic_pricing() { | |
| $WC_Dynamic_Pricing = WC_Dynamic_Pricing::instance(); | |
| remove_filter( 'woocommerce_product_is_on_sale', array( $WC_Dynamic_Pricing, 'on_get_product_is_on_sale'), 10, 2 ); | |
| } | |
| add_action( 'plugins_loaded', 'marce_remove_sale_dynamic_pricing'); |
This file contains hidden or 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 Slider conditionally to the header only for the front page | |
| add_action ( 'woo_content_before', 'marce_front_page_slider' ); | |
| function marce_front_page_slider() { | |
| if ( is_front_page() ) { | |
| echo do_shortcode( '[wooslider slider_type="slides" thumbnails="default" order="DESC" order_by="date"]' ); | |
| } | |
| } |
This file contains hidden or 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 this to your theme's functions.php | |
| function marce_change_custom_logo_size() { | |
| add_theme_support( 'custom-logo', array( | |
| 'height' => 400, | |
| 'width' => 400, | |
| 'flex-width' => true, | |
| ) ); | |
| } |
This file contains hidden or 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 | |
| $user_id = get_current_user_id(); | |
| if ( wc_memberships_is_user_active_member( $user_id, 'gold' ) ) { | |
| get_template_part( 'template', 'assessment' ); | |
| } else { | |
| echo "You are not allowed to view this content"; | |
| } | |
| ?> |
This file contains hidden or 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 (max-width: 768px) { ul.products li.product .onsale { font-size: 0.8em; } } |
This file contains hidden or 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
| .post-4579 p.stock.in-stock { | |
| display: none; | |
| } |