Skip to content

Commit

Permalink
Fixed product url links (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinkmeta authored Jan 21, 2025
1 parent 62f93a6 commit 0072f1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions facebook-commerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -1630,8 +1630,10 @@ public function display_batch_api_completed( $post ) {

if ( $fb_product_item_id ) {
$this->display_success_message(
'Created product <a href="https://facebook.com/' . $fb_product_item_id .
'" target="_blank">' . $fb_product_item_id . '</a> on Facebook.'
'<a href="https://business.facebook.com/commerce/catalogs/'.
$this->get_product_catalog_id().
'/products/'. '" target="_blank">' .
'View product on Meta catalog</a>'
);
}
}
Expand Down
3 changes: 1 addition & 2 deletions includes/Admin/Product_Sync_Meta_Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ public static function output() {

?>

<?php echo esc_html__( 'Facebook ID:', 'facebook-for-woocommerce' ); ?>
<a href="https://facebook.com/<?php echo esc_attr( $fb_product_id ); ?>" target="_blank"><?php echo esc_html( $fb_product_id ); ?></a>
<a href="https://business.facebook.com/commerce/catalogs/<?php echo esc_attr( $fb_integration->get_product_catalog_id() ); ?>/products/" target="_blank"><?php echo esc_html( 'View product on Meta catalog' ); ?></a>

<?php if ( \WC_Facebookcommerce_Utils::is_variable_type( $fb_product->get_type() ) ) : ?>

Expand Down

0 comments on commit 0072f1c

Please sign in to comment.