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 | |
| /** | |
| * This function updates a 'tutor_enrolled' post type after it is created by a scheduled order. Changing the status prevents them from being counted towards totals. | |
| */ | |
| function wcdpp_tutor_after_enrolled( $course_id, $user_id, $enrolled_id ) { | |
| // get the order_id attached to this tutor_enrolled record | |
| $order_id = get_post_meta( $enrolled_id, '_tutor_enrolled_by_order_id', true ); | |
| if ( $order_id ) { | |
| // check if order is a scheduled order |
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 | |
| /** | |
| * Duplicates groups and fields for translated products. Original product should have duplicated groups and fields by this time. | |
| */ | |
| function pewc_product_duplicate_polylang( $duplicate, $product ) { | |
| // check that this function exists | |
| if ( function_exists( 'pll_get_post_translations' ) ) { | |
| $new_id = $duplicate->get_id(); | |
| $old_id = $product->get_id(); | |
| $new_trs = pll_get_post_translations( $new_id ); |
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 | |
| /** | |
| * Set all groups to open (or closed ) in an accordion | |
| */ | |
| function prefix_filter_initial_accordion_states( $state, $post_id ) { | |
| // return 'closed'; // Uncomment this out and comment the line below to set all groups to closed | |
| return 'open'; | |
| } | |
| add_filter( 'pewc_filter_initial_accordion_states', 'prefix_filter_initial_accordion_states', 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
| @media (max-width: 600px) { | |
| .wcpauau-modal-footer { | |
| display: flex; | |
| width: 100%; | |
| justify-content: space-between; | |
| } | |
| .wcpauau-modal-footer .button { | |
| font-size: 14px !important; | |
| } | |
| ul.pewc-product-extra-groups{ |
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 | |
| /** | |
| * Quote request email | |
| */ | |
| defined( 'ABSPATH' ) || exit; | |
| /* | |
| * @hooked WC_Emails::email_header() Output the email header | |
| */ |
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 | |
| /** | |
| * Translate Pending User Notice | |
| */ | |
| function pending_user_notice( $notice ) { | |
| $notice= "Käyttäjätilin tyyppi"; /** Translation here **/ | |
| return $notice; | |
| } |
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 fee_discount_label( $fields ) { | |
| $fields = 'Bulk order discount'; /** Change label test **/ | |
| return $fields; | |
| } | |
| add_filter( 'wcfad_cart_discount_label' , 'fee_discount_label' ); |
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 remove_quote_fields( $fields ) { | |
| /** Remove company & message field **/ | |
| unset($fields['company']); | |
| unset($fields['message']); | |
| /** Make phone field required **/ | |
| $fields['phone']['required'] = 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
| /** Disabled dates color **/ | |
| .bfwc-optimise-colours .ui-datepicker td.ui-state-disabled { | |
| background: #FF0000 !important; | |
| opacity: 1 !important; | |
| } | |
| /** Fix calendar next/previous icons **/ | |
| .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span{ | |
| display: none !important; |
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 | |
| /** | |
| * Translate Role label | |
| */ | |
| function example_callback( $role ) { | |
| $role= "Käyttäjätilin tyyppi"; | |
| return $role; | |
| } |