Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php // don't add this line since it's already in your functions.php file
  2.  
  3.  
  4. function _add_hsd_woo_build_response_html( $html = '', $handler_object ) {
  5. if ( ! function_exists( 'get_user_blog_url_by_email' ) ) {
  6. return;
  7. }
  8. if ( ! empty( $handler_object->customer_emails ) ) {
  9. $html .= '<ul class="unstyled">';
  10. foreach ( $handler_object->customer_emails as $email ) {
  11. $user = get_user_by( 'email', $email );
  12. if ( ! is_a( $user, 'WP_User' ) ) {
  13. continue;
  14. }
  15. $html .= '<li>' . get_user_blog_url_by_email( $email ) . '</li>'; // append the url to the html
  16. }
  17. $html .= '</ul>';
  18. }
  19. return $html;
  20. }
  21. add_filter( 'hsd_woo_build_response_html', '_add_hsd_woo_build_response_html', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement