HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
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: //proc/self/cwd/wp-content/plugins/woo-sale-discount-scheduler/functions.php
<?php 
if(!defined('ABSPATH')) exit;

if(!defined("WSDS_PLUGIN_DIR_PATH"))
	
	define("WSDS_PLUGIN_DIR_PATH",plugin_dir_path(__FILE__));
	
if(!defined("WSDS_PLUGIN_URL"))
	
	define("WSDS_PLUGIN_URL",plugins_url().'/'.basename(dirname(__FILE__)));
	

function wsds_get_post_meta_options()
{
	global $post_id;
	return get_post_meta( $post_id, 'wsds_schedule_sale_meta',true);
}

// Get Product IDs

function wsds_get_schedule_product_list($status){
	global $post;
	$product_ids=array();
	$args = array(
	'posts_per_page' => -1,
    'post_type'  => 'product',
    'meta_query' => array(
        'relation' => 'AND',
        array(
            'key'     => 'wsds_schedule_sale_status',
            'value'   => 1,
            'compare' => '=',
        ),
        array(
            'key'     => 'wsds_schedule_sale_mode',
            'value'   => $status,
			'compare' => '=',		
			),
		)
	);
	
	$wsds_products= get_posts( $args );	
	foreach ($wsds_products as $wsds_product)
	{ 	
		array_push($product_ids,$wsds_product->ID);		
	}	
	return $product_ids;
}

// Success message
function  success_option_msg_wsds($msg)
{
	
	
	return ' <div class="notice notice-success wsds-success-msg is-dismissible"><p>'. $msg . '</p></div>';		
	
}

// Error message
function  failure_option_msg_wsds($msg)
{

	return '<div class="notice notice-error wsds-error-msg is-dismissible"><p>' . $msg . '</p></div>';		
	
}

?>