WordPress at Your Fingertips
function is not described

WC_Install::page_created() public WC 5.6.0

When pages are created, we might want to take some action. In this case we want to set an option when refund and returns page is created.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Install::page_created( $page_id, $page_data );
$page_id(int) (required)
ID of the page.
$page_data(array) (required)
The data of the page created.

Changelog

Since 5.6.0 Introduced.

Code of WC_Install::page_created() WC 5.6.0

public static function page_created( $page_id, $page_data ) {
	if ( 'refund_returns' === $page_data['post_name'] ) {
		delete_option( 'woocommerce_refund_returns_page_created' );
		add_option( 'woocommerce_refund_returns_page_created', $page_id, '', false );
	}
}