Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Woocommerce Changing the Entry Title of the Custom Endpoint

<?php
/*
 * Change the entry title of the endpoints that appear in My Account Page - WooCommerce 2.6
 * Using the_title filter
 */

function wpb_woo_endpoint_title( $title, $id ) {

	if ( is_wc_endpoint_url( 'downloads' ) && in_the_loop() ) { // add your endpoint urls
		$title = "Download MP3s"; // change your entry-title
	}

	elseif ( is_wc_endpoint_url( 'orders' ) && in_the_loop() ) {
		$title = "My Orders";
	}

	elseif ( is_wc_endpoint_url( 'edit-account' ) && in_the_loop() ) {
		$title = "Change My Details";
	}
	return $title;
}

add_filter( 'the_title', 'wpb_woo_endpoint_title', 10, 2 );
Comment

PREVIOUS NEXT
Code Example
Php :: php public folder 
Php :: this app is not allowed to query for scheme fb-messenger" 
Php :: convert to string php 
Php :: change aspect ratio of image php 
Php :: PHP OOP - Destructor 
Php :: php foreach json object 
Php :: Generating Random String In PHP Using random_bytes() function. (Cryptographically Secure) 
Php :: get url parameter laravel 5.2 constructor 
Php :: Form::select laravel 
Php :: laravel auth sha-1 
Php :: php reload after env 
Php :: how to reverse a string in php 
Php :: wordpress how to display breadcrumb in child theme programmatically 
Php :: get last word of string php 
Php :: assign to array array of values php 
Php :: laravel list all tbales 
Php :: log magento 1 
Php :: php sec to hours/minuts 
Php :: how to fetch days old records php mysql 
Php :: wordpress convert object to array 
Php :: custom blade directive 
Php :: Uninitialized string offset 
Php :: bulk update data in db query in laravel 8 
Php :: bulk write mongodb php 
Php :: How to execute “php artisan migrate” and other Laravel commands in remote server? 
Php :: php class instance 
Php :: drupal form show description 
Php :: can i back up mysql database from php code? 
Php :: laravel collection take 
Php :: php last of string till / 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =