HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/shoetique/wp-content/plugins/facebook-for-woocommerce/includes/test/fbproductfeed-test.php
<?php
/**
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
 *
 * This source code is licensed under the license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @package FacebookCommerce
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

require_once dirname( __DIR__ ) . '/fbproductfeed.php';
require_once dirname( __DIR__ ) . '/fbutils.php';

if ( ! class_exists( 'WC_Facebook_Product_Feed_Test' ) ) :
	/**
	 * Mock for Facebook feed class
	 */
	class WC_Facebook_Product_Feed_Test_Mock extends WC_Facebook_Product_Feed {

		/** @var int|null Product post ID for testing */
		public static $product_post_wpid = null;

		/**
		 * Return test product post id.
		 * Don't mess up actual products.
		 *
		 * @return int|null Product post ID
		 */
		public function get_product_wpid() {
			return self::$product_post_wpid;
		}

		/**
		 * Log progress in local log file for testing.
		 * Not to overwhelm DB log to track important signals.
		 *
		 * @param string $msg  Message to log
		 * @param array  $data Optional data to include in the log
		 */
		public function log_feed_progress( $msg, $data = array() ) {
			$msg = empty( $data ) ? $msg : $msg . wp_json_encode( $data );
			WC_Facebookcommerce_Utils::log( 'Test - ' . $msg );
		}
	}

endif;