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
<?php | |
// Add this code to your theme functions.php file or a custom plugin | |
if ( class_exists( 'zorem_woocommerce_advanced_shipment_tracking' ) ) { | |
add_action( 'wp_wc_invoice_pdf_start_template', function() { | |
$tracking_actions = $GLOBALS[ 'WC_advanced_Shipment_Tracking' ]; | |
remove_action( 'woocommerce_email_before_order_table', array( $tracking_actions, 'email_display' ), 0, 4 ); | |
}); | |
add_action( 'wp_wc_invoice_pdf_end_template', function() { | |
$tracking_actions = $GLOBALS[ 'WC_advanced_Shipment_Tracking' ]; |
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
<?php | |
add_filter( "wcalr_login_redirect", "wcalr_login_redirect_link", 10, 1); | |
function wcalr_login_redirect_link($link){ | |
$link = get_home_url(); | |
return $link; | |
} |
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
<?php | |
add_filter( "wcalr_register_redirect", "wcalr_register_redirect_link", 10, 1); | |
function wcalr_register_redirect_link($link){ | |
$link = get_home_url(); | |
return $link; | |
} |
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( "wcalr_after_login", 'wcalr_after_login_func', 10, 1 ); | |
function wcalr_after_login_func($user_signon){ | |
wp_set_current_user($user_signon->ID); | |
wp_set_auth_cookie($user_signon->ID); | |
} |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTP:Authorization} ^(.*) | |
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1] | |
</IfModule> |
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
<?php | |
// Add this code to your theme functions.php file or a custom plugin | |
add_action('init', 'register_partial_shipped_order_status'); | |
//add status after completed | |
add_filter('wc_order_statuses', 'add_partial_shipped_to_order_statuses'); | |
//Custom Statuses in admin reports | |
add_filter('woocommerce_reports_order_statuses', 'include_partial_shipped_order_status_to_reports', 20, 1); | |
// for automate woo to check order is paid | |
add_filter('woocommerce_order_is_paid_statuses', 'partial_shipped_woocommerce_order_is_paid_statuses'); | |
/*** Register new status : Delivered |
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
<?php | |
// Filter for change description before tracking form | |
// Default text - To track your order please enter your Order ID in the box below and press the "Track" button. This was given to you on your receipt and in the confirmation email you should have received. | |
add_filter( 'ast_tracking_page_front_text', 'ast_tracking_page_front_text_fun' ); | |
function ast_tracking_page_front_text_fun($string){ | |
$string = 'Updated Text'; | |
return $string; | |
} | |
// Filter for change text of order label in form |
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
/** | |
* redirect 404 error page. | |
*/ | |
function redirect_404_to_otherpage($url){ | |
return $url = get_permalink('page id'); | |
} | |
add_filter( 'cbr_redirect_page_dir', 'redirect_404_to_otherpage', 10, 1 ); |
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
<?php | |
add_filter( 'woocommerce_payment_complete_order_status', 'virtual_order_payment_complete_order_status', 10, 4 ); | |
/* | |
* move processing to completed | |
*/ | |
function virtual_order_payment_complete_order_status( $order_status, $order_id ) { | |
$order = wc_get_order( $order_id ); | |
if ( 'processing' == $order_status ) { | |
$virtual_order = null; |
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
<?php | |
add_filter( 'ast_provider_title', 'ast_provider_title_fun' ); | |
function ast_provider_title_fun($provider){ | |
if($provider == 'UPS')$provider = 'Updated UPS'; | |
return $provider; | |
} | |
?> |
OlderNewer