autoship_display_apply_customer_info_to_all_scheduled_orders_btn_link (function)
(src/customers.php) Used to add the 'Click here to update your shipping address on all Scheduled Orders' link to the existing (WooCommerce) notice on the My Account > Addresses page. It takes the (WC) $notice as its parameter and hooks into the 'woocommerce_my_account_my_address_description' filter to display.
Function
/**
* Outputs the Button link on the Addresses Page
*/
function autoship_display_apply_customer_info_to_all_scheduled_orders_btn_link( $notice ){
// Get the Set on all scheduled orders action url.
$url = autoship_get_scheduled_orders_update_customer_info_url( get_current_user_id() );
ob_start();
echo $notice .'<br/>';
// Only display the notice if the user has scheduled orders.
if ( apply_filters('autoship_display_customer_update_actions', true, get_current_user_id() ) ){
echo apply_filters( 'autoship_display_apply_customer_info_to_all_scheduled_orders_btn_link_label', sprintf( __('Click <a href="%s">here</a> to update your shipping address on all %s', 'autoship'), $url, autoship_translate_text( 'Scheduled Orders' ) ), $url );
}
echo apply_filters( 'autoship_display_apply_customer_info_to_all_scheduled_orders_btn_label' , ob_get_clean(), $url, $notice );
}
add_filter( 'woocommerce_my_account_my_address_description','autoship_display_apply_customer_info_to_all_scheduled_orders_btn_link', 10, 1 );