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 tooltip to cvc field | |
| function custom_credit_card_fields_cis_cc ($cc_fields , $payment_id){ | |
| $cc_fields['card-cvc-field'] = str_replace('<p class="form-row form-row-last">','<p class="form-row form-row-last" title="3-digit security code usually found on the back of your card. American Express cards have a 4-digit code located on the front.">',$cc_fields['card-cvc-field']); | |
| return $cc_fields; | |
| } | |
| add_filter( 'woocommerce_credit_card_form_fields' , 'custom_credit_card_fields_cis_cc' , 10, 2 ); |
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 the count to our shop menu items | |
| function nim_menu_item_count( $items, $menu, $args ) { | |
| // Only proceed if we are looking at the correct menu and not in the admin | |
| if ( $menu->slug != 'your-menu-slug' || is_admin() ) | |
| return $items; | |
| //grab each menu item and it's object_id (which ends up being the category ID for the product category) | |
| foreach ($items as $item) { |
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 action to process mailchimp signup if checked | |
| function mc_checkout_field_process() { | |
| //only run the following if the option to subscribe has been selected | |
| if ( $_POST['mc-subscribe'] == 'on' ) { | |
| //retrieve email, first, and last name from form | |
| $email = $_POST['billing_email']; | |
| $first_name = $_POST['billing_first_name']; | |
| $last_name = $_POST['billing_last_name']; |
NewerOlder