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 wt_add_more_countries($country_list) { | |
| array_push($country_list, 'CA'); | |
| return $country_list; | |
| } | |
| add_filter('wt_gdpr_eu_countrylist', 'wt_add_more_countries'); |
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 wt_add_length( $subscription_ranges, $subscription_period ) { | |
| $subscription_ranges['month'][25] = __('25 months', 'xa-woocommerce-subscriptions'); | |
| $subscription_ranges['month'][26] = __('26 months', 'xa-woocommerce-subscriptions'); | |
| $subscription_ranges['month'][27] = __('27 months', 'xa-woocommerce-subscriptions'); | |
| $subscription_ranges['month'][36] = __('36 months', 'xa-woocommerce-subscriptions'); | |
| return $subscription_ranges; |
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_filter('cli_show_cookie_bar_only_on_selected_pages', 'webtoffee_custom_selected_pages', 10, 2); | |
| function webtoffee_custom_selected_pages($html, $slug) { | |
| $slug_array = array('sample-page', 'test-page', 'my*'); | |
| if (in_array($slug, $slug_array)) { | |
| $html = ''; | |
| return $html; | |
| } |
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_filter('cli_new_columns_to_audit_table','cli_add_new_columns',10,1); | |
| function cli_add_new_columns($table) | |
| { | |
| $table .= '<th class="cookielawinfo-column-5">'.__('Cookie ID', 'cookie-law-info').'</th>'; | |
| $table .= '<th class="cookielawinfo-column-6">'.__('Cookie Sensitivity', 'cookie-law-info').'</th>'; | |
| return $table; | |
| } | |
| add_filter('cli_new_column_values_to_audit_table','cli_add_value_to_new_columns',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
| add_action( 'woocommerce_order_status_processing', 'processing_to_completed'); | |
| function processing_to_completed($order_id){ | |
| $order = new WC_Order($order_id); | |
| $order->update_status('completed'); | |
| } |
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_filter('cli_new_columns_to_audit_table', 'wt_add_new_column',10,1); | |
| function wt_add_new_column($table) | |
| { | |
| return $table .= '<th class="cookielawinfo-column-5">'.__('Cookie ID', 'cookie-law-info').'</th>'; | |
| } | |
| add_filter('cli_new_column_values_to_audit_table','wt_add_new_value',10,2); | |
| function wt_add_new_value($ret, $custom) |
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_filter('hf_memberships_new_membership_data', 'webtoffee_assign_role_after_membership'); | |
| function webtoffee_assign_role_after_membership($new_membership_data, $user_id_product_id_order_id) { | |
| $theUser = new WP_User($user_id_product_id_order_id['user_id']); | |
| $role = 'mycustomrole'; // string $role = Role name | |
| $theUser->add_role($role); |
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_filter('woocommerce_account_menu_items', 'webtoffee_remove_my_account_links'); | |
| function webtoffee_remove_my_account_links($menu_links) { | |
| unset($menu_links['subscriptions']); // Subscriptions | |
| unset($menu_links['payment-methods']); // Payment methods | |
| return $menu_links; | |
| } |
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('template_redirect', 'webtoffee_custom_redirect_after_purchase'); | |
| function webtoffee_custom_redirect_after_purchase() { | |
| global $wp; | |
| if (is_checkout() && !empty($wp->query_vars['order-received'])) { | |
| wp_redirect('http://www.webtoffee.com/'); // Redirect to your desired page here. |
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_filter('woocommerce_product_add_to_cart_text', 'webtoffee_archive_custom_addtocart_button_text', 10, 2); | |
| function webtoffee_archive_custom_addtocart_button_text($var, $instance) | |
| { | |
| if(is_shop()){ | |
| $var = __('Read More', 'woocommerce'); | |
| } | |
| return $var; |