php Archives - PokaTheme https://pokatheme.com/topic-tag/php/ Poker Affiliate WordPress Themes Wed, 22 Mar 2023 16:36:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.2 PHP Warning: filemtime() https://pokatheme.com/topic/php-warning-filemtime/ Wed, 22 Mar 2023 16:36:29 +0000 https://pokatheme.com/topic/php-warning-filemtime/ Hello, I see in log this error: [STDERR] PHP Warning: filemtime(): stat failed for https://WEBSITE/wp-content/plugins/poka-review/public/css/poka-review-main.css in /var/www/html/wp-content/plugins/poka-review/public/class-poka-review-public.php on line 96 How to fix it?

The post PHP Warning: filemtime() appeared first on PokaTheme.

]]>
Hello,

I see in log this error:

[STDERR] PHP Warning: filemtime(): stat failed for https://WEBSITE/wp-content/plugins/poka-review/public/css/poka-review-main.css in /var/www/html/wp-content/plugins/poka-review/public/class-poka-review-public.php on line 96

How to fix it?

The post PHP Warning: filemtime() appeared first on PokaTheme.

]]>
wp_insert_post doesn’t work with reviews https://pokatheme.com/topic/wp_insert_post-doesnt-work-with-reviews/ Sun, 17 Jul 2022 10:58:04 +0000 https://pokatheme.com/topic/wp_insert_post-doesnt-work-with-reviews/ Hello, When I try to programmatically insert posts using PokaTheme into the “affiliates” custom post type, the posts show as published, but are not visible on the frontend until after I click “Update” in the editor. I’ve been researching this for hours and testing various things, but cannot find why they don’t show up. Here’s […]

The post wp_insert_post doesn’t work with reviews appeared first on PokaTheme.

]]>
Hello,

When I try to programmatically insert posts using PokaTheme into the “affiliates” custom post type, the posts show as published, but are not visible on the frontend until after I click “Update” in the editor.

I’ve been researching this for hours and testing various things, but cannot find why they don’t show up.

Here’s the code:

$insert_post_test = array(
‘post_title’ => $article_title,
‘post_content’ => $article_body,
‘post_date’ => $drip_time,
‘post_status’ => ‘publish’,
‘post_type’ => ‘affiliates’,
‘tax_input’ => array(
‘lists’ => array( 198 ),
),
‘meta_input’ => [
‘pokafield_affiliate_tag’ => ‘Reload Bonus’,
],
);
$insert_post = wp_insert_post($insert_post_test);

Inserting a post into the regular “post” post_type works, and even inserting posts into custom types with other themes works.

I even tried searching the PokaTheme files to see what could be causing this, but nothing works.

Am I missing something, or does PokaTheme not trigger something when programmatically adding reviews?

Thanks

The post wp_insert_post doesn’t work with reviews appeared first on PokaTheme.

]]>