Automattic\WooCommerce\Admin
PageController::get_path_from_id
Returns the path from an ID.
Method of the class: PageController{}
No Hooks.
Returns
String. Path for the given ID, or the ID on lookup miss.
Usage
$PageController = new PageController(); $PageController->get_path_from_id( $id );
- $id(string) (required)
- ID to get path for.
PageController::get_path_from_id() PageController::get path from id code WC 10.4.3
public function get_path_from_id( $id ) {
if ( isset( $this->pages[ $id ] ) && isset( $this->pages[ $id ]['path'] ) ) {
return $this->pages[ $id ]['path'];
}
return $id;
}