WC_Regenerate_Images_Request::__construct()publicWC 1.0

Initiate new background process.

Method of the class: WC_Regenerate_Images_Request{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Regenerate_Images_Request = new WC_Regenerate_Images_Request();
$WC_Regenerate_Images_Request->__construct();

WC_Regenerate_Images_Request::__construct() code WC 9.3.3

public function __construct() {
	// Uses unique prefix per blog so each blog has separate queue.
	$this->prefix = 'wp_' . get_current_blog_id();
	$this->action = 'wc_regenerate_images';

	// Limit Imagick to only use 1 thread to avoid memory issues with OpenMP.
	if ( extension_loaded( 'imagick' ) && method_exists( Imagick::class, 'setResourceLimit' ) ) {
		if ( defined( 'Imagick::RESOURCETYPE_THREAD' ) ) {
			Imagick::setResourceLimit( Imagick::RESOURCETYPE_THREAD, 1 );
		} else {
			Imagick::setResourceLimit( 6, 1 );
		}
	}

	parent::__construct();
}