WordPress at Your Fingertips
function is not described


PageController::get_current_page() public WC 1.0

Get the current page.

{} It's a method of the class: PageController{}

No Hooks.


Array|true|false. Current page or false if not registered with this controller.


$PageController = new PageController();

Code of PageController::get_current_page() WC 6.1.1

public function get_current_page() {
	// If 'current_screen' hasn't fired yet, the current page calculation
	// will fail which causes `false` to be returned for all subsquent calls.
	if ( ! did_action( 'current_screen' ) ) {
		_doing_it_wrong( __FUNCTION__, esc_html__( 'Current page retrieval should be called on or after the `current_screen` hook.', 'woocommerce' ), '0.16.0' );

	if ( is_null( $this->current_page ) ) {

	return $this->current_page;