Created
August 2, 2018 08:58
-
-
Save calvez/9d493ecd1bc5201b47a7ca7504474ec8 to your computer and use it in GitHub Desktop.
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_filter('woocommerce_product_single_add_to_cart_text', 'rental_single_product_add_to_cart',10,2); | |
| add_filter('woocommerce_product_add_to_cart_text', 'rental_single_product_add_to_cart',10,2); | |
| function rental_single_product_add_to_cart( $title,$product ) { | |
| return 'Ajánlatkérés'; | |
| } | |
| add_action('woocommerce_widget_shopping_cart_before_buttons', 'rental_before_mini_cart_checkout',10); | |
| function rental_before_mini_cart_checkout(){ | |
| //change buttons in the flyout cart | |
| echo ' | |
| <p class="buttons" style="display: block;"> | |
| <a href="'.esc_url( wc_get_checkout_url() ).'" class="button checkout wc-forward">Ajánlatkérés elküldése</a> | |
| </p> | |
| '; | |
| } | |
| add_filter('woocommerce_billing_fields','rental_billing_fields',10,1); | |
| function rental_billing_fields($fields){ | |
| unset($fields['billing_country']); | |
| unset($fields['billing_address_1']); | |
| unset($fields['billing_address_2']); | |
| unset($fields['billing_city']); | |
| unset($fields['billing_state']); | |
| unset($fields['billing_postcode']); | |
| return $fields; | |
| } | |
| add_filter('woocommerce_checkout_fields','rental_checkout_fields',10,1); | |
| function rental_checkout_fields($fields){ | |
| //change comment field labels | |
| $fields['order']['order_comments']['label'] = 'Megjegyzések'; | |
| return $fields; | |
| } | |
| add_filter('woocommerce_order_button_text','rental_order_button_text',10,1); | |
| function rental_order_button_text($text){ | |
| return 'Ajánlatkérés'; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment