ashpuk
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: [WP 6.0.1]upgrader_post_install hook not calledHi,
I am using WP 6.1.1 and potentially have the same or a similar issue to @trustring . I am running the following code in my plugin.php file:add_action( 'upgrader_post_install', 'yd_upgrader_process_complete', 10, 3 ); function yd_upgrader_process_complete( $upgrader_object, $hook_extra, $result ) { if ( $result['destination_name'] === 'yd' ) { error_log('Yd was updated, rebuilding sitemap and merchant feed..2345'); $Yd = new Yd(); $Yd->yd_sitemap(); } }
What is really strange is that this code executes using the previous version of the plugins code, which is I think the same issue that the original poster described.
For example if I were to change the numbers at the end of the error_log and then upload this file, the error log would show the previous set of numbers. If I uploaded the same file for a second time then it would show the updated [correct] set of numbers.
In the example that @threadi gave, there is a small chance that because he is calling the same error log, he may actually be calling the older version without realising..or not, but it would be very interesting to know;
1. @trustring did you manage to get this fixed?
2. @threadi are you able to double check my theory?Spent around 5 hours on this now and it’s driving me insane ??
Thanks