Created
February 6, 2024 19:29
-
-
Save Asikur22/bd54e956a8508f1cd852c2597f5d1c35 to your computer and use it in GitHub Desktop.
WooCommerce Change My Account Endpoint Document Title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filters document title. | |
* | |
* @param array $title The document title parts. | |
* | |
* @return array | |
*/ | |
function wp98_endpoint_document_title( $title ) { | |
if ( is_wc_endpoint_url( 'orders' ) ) { | |
$title['title'] = __( 'My Order Custom Document Title', 'woocommerce' ); | |
} | |
return $title; | |
} | |
add_filter( 'document_title_parts', 'wp98_endpoint_document_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment