Home > front end >  Change Verbiage on WooCommerce Subscriptions Customer Facing
Change Verbiage on WooCommerce Subscriptions Customer Facing

Time:10-28

I'm looking to change the verbiage for the word "Suspend" to the word "Pause" on the customer-facing side of WooCommerce Subscriptions. I have the filter that pulls up the action buttons but I'm unsure of how to pull the specific action of "Suspend" and change it to the word "Pause".

Here is the filter.

apply_filters( 'wcs_view_subscription_actions', $actions, $subscription );

Any help would be much appreciated. If you need more information I'm happy to provide what I can.

CodePudding user response:

You can use the wcs_view_subscription_actions filter hook. this way. check below code. code will go in your active theme functions.php file.

add_filter( 'wcs_view_subscription_actions', 'change_action_buttons_label', 10, 2 );
function change_action_buttons_label( $actions, $subscription ){
    if( isset( $actions['suspend'] ) ){
        $actions['suspend']['name'] = __( 'Pause', 'woocommerce-subscriptions' );
    }
    return $actions;
}
  • Related