33 * Pinterest for WooCommerce Feed Files Generator
44 *
55 * @package Pinterest_For_WooCommerce/Classes/
6- * @since x.x.x
6+ * @since 1.0.10
77 */
88
99namespace Automattic \WooCommerce \Pinterest ;
@@ -54,7 +54,7 @@ class FeedGenerator extends AbstractChainedJob {
5454 /**
5555 * FeedGenerator initialization.
5656 *
57- * @since x.x.x
57+ * @since 1.0.10
5858 * @param ActionSchedulerInterface $action_scheduler Action Scheduler proxy.
5959 * @param LocalFeedConfigs $local_feeds_configurations Locations configuration class.
6060 */
@@ -66,7 +66,7 @@ public function __construct( ActionSchedulerInterface $action_scheduler, $local_
6666 /**
6767 * Initialize FeedGenerator actions and Action Scheduler hooks.
6868 *
69- * @since x.x.x
69+ * @since 1.0.10
7070 */
7171 public function init () {
7272 // Initialize the action handlers.
@@ -87,7 +87,7 @@ function () {
8787 /**
8888 * Reschedule the next feed generator start.
8989 *
90- * @since x.x.x
90+ * @since 1.0.10
9191 * @param integer $timestamp Next feed generator timestamp.
9292 */
9393 public function schedule_next_generator_start ( $ timestamp ) {
@@ -107,7 +107,7 @@ public static function cancel_jobs() {
107107 /**
108108 * Start the queue processing.
109109 *
110- * @since x.x.x
110+ * @since 1.0.10
111111 */
112112 private function start_generation () {
113113 if ( $ this ->is_running () ) {
@@ -122,7 +122,7 @@ private function start_generation() {
122122 /**
123123 * Runs as the first step of the generation process.
124124 *
125- * @since x.x.x
125+ * @since 1.0.10
126126 *
127127 * @throws Throwable Related to issues possible when creating an empty feed temp file and populating the header.
128128 */
@@ -146,7 +146,7 @@ protected function handle_start() {
146146 * Runs as the last step of the job.
147147 * Add XML footer to the feed files and copy the move the files from tmp to the final destination.
148148 *
149- * @since x.x.x
149+ * @since 1.0.10
150150 *
151151 * @throws Throwable Related to issues possible when adding the footer or renaming the files.
152152 */
@@ -210,7 +210,7 @@ protected function get_items_for_batch( int $batch_number, array $args ): array
210210 * Processes a batch of items. The middle part of the generation process.
211211 * Can run multiple times depending on the catalog size.
212212 *
213- * @since x.x.x
213+ * @since 1.0.10
214214 *
215215 * @param array $items The items of the current batch.
216216 * @param array $args The args for the job.
@@ -229,7 +229,7 @@ protected function process_items( array $items, array $args ) {
229229 /**
230230 * Filter excluded product types.
231231 *
232- * @since x.x.x
232+ * @since 1.0.10
233233 * @param array Array of excluded product types.
234234 */
235235 $ excluded_product_types = apply_filters (
@@ -312,7 +312,7 @@ public function get_plugin_name(): string {
312312 /**
313313 * Marks feed as dirty.
314314 *
315- * @since x.x.x
315+ * @since 1.0.10
316316 */
317317 public function mark_feed_dirty (): void {
318318 Pinterest_For_Woocommerce ()::save_data ( 'feed_dirty ' , true );
@@ -330,7 +330,7 @@ public function mark_feed_dirty(): void {
330330 /**
331331 * Marks feed as clean.
332332 *
333- * @since x.x.x
333+ * @since 1.0.10
334334 */
335335 public function mark_feed_clean (): void {
336336 Pinterest_For_Woocommerce ()::save_data ( 'feed_dirty ' , false );
@@ -339,7 +339,7 @@ public function mark_feed_clean(): void {
339339 /**
340340 * Check if feed is dirty.
341341 *
342- * @since x.x.x
342+ * @since 1.0.10
343343 * @return bool Indicates if feed is dirty or not.
344344 */
345345 public function feed_is_dirty (): bool {
@@ -350,7 +350,7 @@ public function feed_is_dirty(): bool {
350350 * Prepare a fresh temporary file for each local configuration.
351351 * Files is populated with the XML headers.
352352 *
353- * @since x.x.x
353+ * @since 1.0.10
354354 */
355355 private function prepare_temporary_files (): void {
356356 foreach ( $ this ->configurations ->get_configurations () as $ config ) {
@@ -366,7 +366,7 @@ private function prepare_temporary_files(): void {
366366 /**
367367 * Add XML footer to all of the temporary feed files.
368368 *
369- * @since x.x.x
369+ * @since 1.0.10
370370 */
371371 private function add_footer_to_temporary_feed_files (): void {
372372 foreach ( $ this ->configurations ->get_configurations () as $ config ) {
@@ -384,7 +384,7 @@ private function add_footer_to_temporary_feed_files(): void {
384384 * Checks the status of the file write operation and throws if issues are found.
385385 * Utility function for functions using file_put_contents.
386386 *
387- * @since x.x.x
387+ * @since 1.0.10
388388 * @param integer $bytes_written How much data was written to the file.
389389 * @param string $file File location.
390390 *
@@ -416,7 +416,7 @@ private function check_write_for_io_errors( $bytes_written, $file ): void {
416416 /**
417417 * React to errors during feed files generation process.
418418 *
419- * @since x.x.x
419+ * @since 1.0.10
420420 * @param Throwable $th Exception handled.
421421 */
422422 private function handle_error ( $ th ) {
@@ -435,7 +435,7 @@ private function handle_error( $th ) {
435435 * Rename temporary feed files to final name.
436436 * This is the last step of the feed file generation process.
437437 *
438- * @since x.x.x
438+ * @since 1.0.10
439439 * @throws \Exception Renaming not possible.
440440 */
441441 private function rename_temporary_feed_files_to_final (): void {
@@ -458,7 +458,7 @@ private function rename_temporary_feed_files_to_final(): void {
458458 * Remove feed files and cancel pending actions.
459459 * Part of the cleanup procedure.
460460 *
461- * @since x.x.x
461+ * @since 1.0.10
462462 */
463463 public static function deregister (): void {
464464 foreach ( LocalFeedConfigs::get_instance ()->get_configurations () as $ config ) {
@@ -476,7 +476,7 @@ public static function deregister(): void {
476476 /**
477477 * Write pre-populated buffers to feed files.
478478 *
479- * @since x.x.x
479+ * @since 1.0.10
480480 */
481481 private function write_buffers_to_temp_files (): void {
482482 foreach ( $ this ->configurations ->get_configurations () as $ location => $ config ) {
@@ -493,7 +493,7 @@ private function write_buffers_to_temp_files(): void {
493493 /**
494494 * Check if we have a feed file on the disk.
495495 *
496- * @since x.x.x
496+ * @since 1.0.10
497497 */
498498 public function check_if_feed_file_exists () {
499499 $ configs = $ this ->configurations ->get_configurations ();
@@ -507,7 +507,7 @@ public function check_if_feed_file_exists() {
507507 /**
508508 * Create empty string buffers for
509509 *
510- * @since x.x.x
510+ * @since 1.0.10
511511 */
512512 private function prepare_feed_buffers (): void {
513513 foreach ( $ this ->get_locations () as $ location ) {
@@ -518,7 +518,7 @@ private function prepare_feed_buffers(): void {
518518 /**
519519 * Fetch supported locations.
520520 *
521- * @since x.x.x
521+ * @since 1.0.10
522522 */
523523 private function get_locations (): array {
524524 return array_keys ( $ this ->configurations ->get_configurations () );
0 commit comments