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
| // Don't add this opening PHP tag unless your file doesn't already have one | |
| <?php | |
| // Define a new breakpoint for woocommerce-smallscreen.css | |
| function marce_filter_woocommerce_style_smallscreen_breakpoint( $breakpoint ) { | |
| $breakpoint = '200px'; | |
| return $breakpoint; | |
| }; | |
| add_filter( 'woocommerce_style_smallscreen_breakpoint', 'marce_filter_woocommerce_style_smallscreen_breakpoint', 10, 1 ); |
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_action( 'woocommerce_before_add_to_cart_button', 'marce_add_text', 20 ); | |
| function marce_add_text() { | |
| echo '<p>Hello World.</p>'; | |
| } |
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
| /* | |
| Modify the color styles of the WooCommerce Bookings datepicker calendar. | |
| Add any/all of these styles to your theme's custom CSS, but be sure to change | |
| the color hex codes to your choice. They're all black here. | |
| */ | |
| /* Month header background color */ | |
| #wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header { | |
| background-color: #000000; | |
| } |
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
| .storefront-handheld-footer-bar ul li.search .site-search { | |
| bottom: 100%; | |
| } | |
| .storefront-handheld-footer-bar { | |
| top: 0; | |
| } | |
| .storefront-handheld-footer-bar ul li.search.active .site-search { | |
| bottom::-6em; | |
| } |
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 | |
| if ( function_exists( 'wc_memberships_is_user_active_member' ) && wc_memberships_is_user_active_member( get_current_user_id(), 'Platinum' ) ) { | |
| //all of the code for the shop archive is here | |
| } else { | |
| //here you would output something other than the shop loop, perhaps instructions on how to join and/or login | |
| } |
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 | |
| function wc_limit_account_menu_items() { | |
| // Administrator and Shop Manager roles | |
| if ( current_user_can( 'manage_woocommerce' ) ) { | |
| $items = array( | |
| 'dashboard' => __( 'Dashboard', 'woocommerce' ), | |
| 'orders' => __( 'Orders', 'woocommerce' ), | |
| // 'downloads' => __( 'Downloads', 'woocommerce' ), | |
| 'edit-address' => __( 'Addresses', 'woocommerce' ), |
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', 'gold' ); | |
| } 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
| jQuery( function( $ ) { | |
| $(function() { | |
| $pay_in_full = ( $('#wc-option-pay-full') ); | |
| console.log($pay_in_full.val()); | |
| if ( 'no' === $pay_in_full.val() ) { | |
| $( '.wc-deposits-payment-plans' ).hide(); | |
| } | |
| }); | |
| $( '.wc-deposits-wrapper' ) | |
| .on( 'change', 'input[name="wc_deposit_option"]', function() { |
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
| // Don't copy this opening PHP tag if your file already has one. That breaks things. | |
| <?php | |
| function marce_slider_before_storefront_content () { | |
| // If the template is not the homepage (template-homepage.php), don't display. | |
| if ( ! is_page_template( 'template-homepage.php' ) ) { | |
| return false; | |
| } | |
| // If it is the homepage, add this meta slider shortcode | |
| echo do_shortcode( '[metaslider id=586]'); |