Skip to content

Commit 6ba3315

Browse files
Merge pull request #397 from stefanfisk/stefanfisk-patch-1
fix: FastCGI AMP purge when purge_method=unlink_files
2 parents af5c59b + 88295a8 commit 6ba3315

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

admin/class-fastcgi-purger.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ public function purge_url( $url, $feed = true ) {
103103
* @param string $url_base The base URL to purge.
104104
*/
105105
private function purge_amp_version( $url_base ) {
106+
global $nginx_helper_admin;
107+
106108
$amp_url = sprintf( '%s/amp/', rtrim( $url_base, '/' ) );
107109

108110
$this->log( '- Purging AMP URL | ' . $amp_url );
109111

110-
if ( 'unlink_files' === $this->nginx_helper_admin->options['purge_method'] ) {
112+
if ( 'unlink_files' === $nginx_helper_admin->options['purge_method'] ) {
111113
$this->delete_cache_file_for( $amp_url );
112114
} else {
113115
$this->do_remote_get( $amp_url );

0 commit comments

Comments
 (0)