Filter for login widget #1998

Closed
mikejolley opened this Issue Dec 17, 2012 · 0 comments

Projects

None yet

1 participant

@mikejolley
WooCommerce member

Just a quick filter request for a future version of WooCommerce if possible. Could you please add a filter on the title of the WooCommerce login widget.

The file in question is /woocommerce/widgets/widget-login.php. Line 65 currently reads:

if ( $logged_in_title ) echo $before_title . sprintf( $logged_in_title, ucwords($user->display_name) ) . $after_title;

would be great if it was wrapped in a filter hook like so:

if ( $logged_in_title ) echo apply_filters( 'woocomerce_login_widget_title', $before_title . sprintf( $logged_in_title, ucwords($user->display_name) ) . $after_title, $user );

with the before & after title params and the user as arguments so that I could modify this to be something else as needed. The particular use-case is that I'd like to change this to display the first name instead of the display name of the user.

@elleb28 elleb28 referenced this issue Jun 3, 2013
Closed

Woocomerce Bug #3135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment