Skip to content

Commit

Permalink
Displays product title all caps notice below FB and variant IDs in FB…
Browse files Browse the repository at this point in the history
… metabox.
  • Loading branch information
Kruti Dugade authored and Kruti Dugade committed Jul 26, 2023
1 parent 2b39868 commit 6db191b
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions includes/Admin/Product_Sync_Meta_Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,6 @@ 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>

<?php

if ( \WC_Facebookcommerce_Utils::is_all_caps( $fb_product->get_title() ) ) {
echo esc_html__( 'may have issue with synchronisation as product title is all capital letters. Please change the title to sentence case to ensure product is synchronized.', 'facebook-for-woocommerce' );
?>
<br/>

<?php
}
?>

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

<?php
Expand Down Expand Up @@ -128,6 +117,11 @@ public static function output() {

<?php endif; ?>

<?php endif; ?>

<?php if ( \WC_Facebookcommerce_Utils::is_all_caps( $fb_product->get_title() ) ): ?>

Check failure on line 122 in includes/Admin/Product_Sync_Meta_Box.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Expected 1 space(s) after closing parenthesis; found 0

Check failure on line 122 in includes/Admin/Product_Sync_Meta_Box.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Space between opening control structure and T_COLON is required
<p><b><?php echo esc_html__( 'Product title in all capital letters can lead to the server rejecting the product. To ensure successful product synchronization, please convert the product title to a sentence case.', 'facebook-for-woocommerce' ); ?></b></p>

<?php endif; ?>

<input name="is_product_page" type="hidden" value="1"/>
Expand Down

0 comments on commit 6db191b

Please sign in to comment.