WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

Loader::delete_homepage() public WC 1.0

Delete woocommerce_onboarding_homepage_post_id field when the homepage is deleted

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

No Hooks.

Return

null. Nothing.

Usage

$result = Loader::delete_homepage( $post_id );
$post_id(int) (required)
The deleted post id.

Code of Loader::delete_homepage() WC 5.8.0

public static function delete_homepage( $post_id ) {
	if ( 'page' !== get_post_type( $post_id ) ) {
		return;
	}
	$homepage_id = intval( get_option( 'woocommerce_onboarding_homepage_post_id', false ) );
	if ( $homepage_id === $post_id ) {
		delete_option( 'woocommerce_onboarding_homepage_post_id' );
	}
}