Skip to content

Commit 725fe54

Browse files
author
Marco Pereirinha
committed
Use the public_id stored in the relationship table to determin the delivery sync
1 parent f221e9e commit 725fe54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

php/class-delivery.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,12 @@ public function generate_signature( $attachment_id ) {
329329
if ( ! $sql ) {
330330
$sql = Utils::get_table_sql();
331331
}
332+
$public_id = null;
333+
$relationship = Relationship::get_relationship( $attachment_id );
334+
if ( $relationship instanceof Relationship ) {
335+
$public_id = $relationship->public_id;
336+
}
332337
$sizes = $this->get_sized( $attachment_id );
333-
$public_id = $this->media->has_public_id( $attachment_id ) ? $this->media->get_public_id( $attachment_id ) : null;
334338
$settings_signature = self::get_settings_signature();
335339
$relation_signature = $this->media->get_post_meta( $attachment_id, Sync::META_KEYS['relationship'], true );
336340

0 commit comments

Comments
 (0)