GRAYBYTE WORDPRESS FILE MANAGER1854

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/chahida.co.in/wp-content/plugins/woo-razorpay/includes/cron/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/chahida.co.in/wp-content/plugins/woo-razorpay/includes/cron//plugin-fetch.php
<?php
/**
 * plugin Fetch details
 * 
 */
use Razorpay\Api\Api;

add_action('one_cc_plugin_sync_cron', 'one_cc_plugin_sync_cron_exce');

function one_cc_plugin_sync_cron_exce() 
{
    rzpLogInfo('Execute one_cc_plugin_sync_cron successful');

    $siteUrl = get_option('siteurl');

    //get all plugin details
    $data = get_plugins();

    //remove additional fields
    foreach(array_keys($data) as $key) {
         unset($data[$key]['DomainPath'], $data[$key]['TextDomain'], $data[$key]['Description'], $data[$key]['AuthorURI']);
    }

    $pluginData = ["url" => $siteUrl, "platform" => "woocommerce", "plugin_info" => $data];

    try
    {
        $paymentSettings = get_option('woocommerce_razorpay_settings');

        $api = new Api($paymentSettings['key_id'], $paymentSettings['key_secret']);
        $response = $api->request->request('POST', RZP_1CC_PLUGIN_FETCH, $pluginData);
    }
    catch (Exception $e)
    {
        rzpLogError($e->getMessage());
    }

}

function syncPluginFetchCron(){

    $startTime = strtotime('today 20:30');
    $endTime =  strtotime('today 20:45');
    $randomTime = mt_rand($startTime, $endTime);

    try
    {
        createPluginFetchCron('one_cc_plugin_sync_cron', $randomTime , 'fifteendays');
        rzpLogInfo('create one_cc_plugin_sync_cron successful');
    }
    catch (Exception $e)
    {
        rzpLogError($e->getMessage());
    }
}


function createPluginFetchCron(string $hookName, int $startTime, string $recurrence)
{
    if (!wp_next_scheduled($hookName))
    {
         wp_schedule_event($startTime, $recurrence, $hookName);
    }

}

function deletePluginFetchCron(string $hookName)
{
    $timestamp = wp_next_scheduled( $hookName );
    wp_unschedule_event( $timestamp, $hookName );
}



[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:25
giriqfky / giriqfky
0755
one-click-checkout
--
July 10 2025 04:32:25
giriqfky / giriqfky
0755
.htaccess
0.41 KB
July 10 2025 04:32:25
giriqfky / giriqfky
0644
cron.php
0.483 KB
April 13 2023 16:44:28
giriqfky / giriqfky
0644
plugin-fetch.php
1.718 KB
July 04 2023 14:51:06
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF