WordPress at Your Fingertips
function is not described

WC_Product::set_post_password() public WC 3.6.0

Set post password.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_post_password( $post_password );
$post_password(int) (required)
Post password.

Changelog

Since 3.6.0 Introduced.

Code of WC_Product::set_post_password() WC 5.5.2

<?php
public function set_post_password( $post_password ) {
	$this->set_prop( 'post_password', $post_password );
}