WC_Admin_Post_Types::unique_filename()publicWC 1.0

Method of the class: WC_Admin_Post_Types{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Admin_Post_Types = new WC_Admin_Post_Types();
$WC_Admin_Post_Types->;

WC_Admin_Post_Types::unique_filename() code WC 8.7.0

}

if ( wc_get_page_id( 'myaccount' ) === $post->ID ) {
	$post_states['wc_page_for_myaccount'] = __( 'My Account Page', 'woocommerce' );
}

if ( wc_get_page_id( 'terms' ) === $post->ID ) {
	$post_states['wc_page_for_terms'] = __( 'Terms and Conditions Page', 'woocommerce' );
}

return $post_states;
	}

	/**
	 * Apply product type constraints to stock status.
	 *
	 * @param WC_Product  $product The product whose stock status will be adjusted.
	 * @param string|null $stock_status The stock status to use for adjustment, or null if no new stock status has been supplied in the request.
	 * @return WC_Product The supplied product, or the synced product if it was a variable product.
	 */
	private function maybe_update_stock_status( $product, $stock_status ) {
if ( $product->is_type( 'external' ) ) {
	// External products are always in stock.
	$product->set_stock_status( 'instock' );