HEX
Server: LiteSpeed
System: Linux premium221.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: madepabj (2566)
PHP: 8.3.26
Disabled: NONE
Upload Files
File: /home/madepabj/gamepointpk.com/wp-content/plugins/groovy-functions/dashboard/products.php
<?php
if( !defined('ABSPATH') ){ exit; }

function epcl_products_page(){
	$cache = get_transient( 'epcl_feed_products' );
    $user_id = get_current_user_id();
    update_user_meta( $user_id, EPCL_THEMESLUG . '_themes_visited', true);
	if ( false === $cache ) {
        $url = 'https://estudiopatagon.com/feed-products/?theme=groovy-wp';
		$feed = wp_remote_get( esc_url_raw( $url ), array(
					'sslverify' => false,
					'timeout' => 30,
				) );
		
		if ( ! is_wp_error( $feed ) ) {
			if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
				$cache = wp_remote_retrieve_body( $feed );
				set_transient( 'epcl_feed_products', $cache, 3600 );
			}
		} else {
            $cache = '<div class="error"><p>' . __( 'There was an error retrieving the products list from the server. Please try again later.', 'epcl-framework' ) . '</div>';			
		}
	}

	echo $cache;
}

// delete_transient('epcl_feed_products');