Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Adding apply_filters to pos_product_thumbnail #156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/api/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private function filter_response_data( array $data, $product ){
$id = isset( $data['id'] ) ? $data['id'] : '';
$barcode = get_post_meta( $id, $this->barcode_meta_key, true );

$data['featured_src'] = $this->get_thumbnail( $id );
$data['featured_src'] = apply_filters( 'woocommerce_pos_product_thumbnail', $this->get_thumbnail( $id ), $id );
$data['barcode'] = apply_filters( 'woocommerce_pos_product_barcode', $barcode, $id );

// allow decimal stock quantities, fixed in WC 2.4
Expand Down Expand Up @@ -538,4 +538,4 @@ private function format_id( $id ){
return array( 'id' => (int) $id );
}

}
}