This file contains 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_view_subscription_actions', 'hf_hide_cancel_action', 10, 2); | |
function hf_hide_cancel_action($actions, $subscription){ | |
if(isset($actions['cancel'])){ | |
unset($actions['cancel']); | |
} | |
return $actions; | |
} |
This file contains 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_view_subscription_actions', 'disable_myacc_user_actions', 10, 2); | |
function disable_myacc_user_actions($actions, $subscription) { | |
// unset($actions['cancel']); | |
// unset($actions['suspend']); | |
unset($actions['resubscribe']); | |
return $actions; | |
This file contains 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( 'wf_alter_shipmentlabel_from_address', 'wf_new_shipping_from_address_format',10,3 ); | |
function wf_new_shipping_from_address_format($original_address_format,$order,$from_address) | |
{ | |
$original_address_format .= '<br/>'; | |
$original_address_format .= 'GSTIN:'; | |
$original_address_format .= '12345676787'; | |
$original_address_format .= '<br/>'; | |
This file contains 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 webtoffee_strictly_enabled_cookie_categories($strict_categories) { | |
$count = count($strict_categories); | |
$strict_categories[$count] = 'skroutz'; | |
$strict_categories[$count+1] = 'pixel'; | |
return $strict_categories; | |
} |
This file contains 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; |
This file contains 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 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 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 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); |
This file contains 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'); | |
} |
OlderNewer