Automattic\WooCommerce\Internal\ProductFeed\Feed
ResumableFeedInterface::open
Start a feed fresh, or resume one that a previous chunk began.
A feed may be written across separate processes (one Action Scheduler action per chunk), so it lives in a stable, shared location identified by the returned value. Pass that identifier back on a later chunk to keep appending to the same feed; pass nothing to begin a new one.
Method of the class: ResumableFeedInterface{}
No Hooks.
Returns
String. The identifier of the feed that was started, to be passed back by later chunks.
Usage
$ResumableFeedInterface = new ResumableFeedInterface(); $ResumableFeedInterface->open( ?string $resume_identifier, $entries_written ): string;
- ?string $resume_identifier
- .
Default:null - $entries_written(int)
- The number of entries already written by previous chunks, so separators are added correctly when resuming.
Changelog
| Since 11.0.0 | Introduced. |
ResumableFeedInterface::open() ResumableFeedInterface::open code WC 11.0.0
public function open( ?string $resume_identifier = null, int $entries_written = 0 ): string;