Custom Filters

Custom Filters

1. Custom filter for optional fee section on the checkout page.

Code:

add_filter( 'wcpfc_optional_fee_text', 'custom_title_for_optional_fee', 10 );
function custom_title_for_optional_fee( ) {
    //Custom title for optional fee section on checkout
    return 'WILL THIS BE STUDENT PACK?';
}
Screenshot 1: (Checkout page default layout)

Screenshot 2: (Checkout page layout after the filter applies)