Home / Forums / WoodMart support forum / My rest-api setting is not working
Home › Forums › WoodMart support forum › My rest-api setting is not working
My rest-api setting is not working
- This topic has 9 replies, 2 voices, and was last updated 1 year, 5 months ago by
Artem Temos.
-
AuthorPosts
-
February 4, 2025 at 11:34 am #635218
emreyildiz41ParticipantI sent the message content secretly
February 4, 2025 at 11:39 am #635221Hello,
To better assist you, could you kindly test the functionality with default WordPress themes such as TwentyTwenty or WooCommerce Storefront? This will help us determine whether the issue stems from our theme or elsewhere.
Regards
February 4, 2025 at 12:48 pm #635249
emreyildiz41ParticipantI tried it with the TwentyTwenty-four theme and it works. I wrote to you because I am sure it is due to the theme.
February 4, 2025 at 3:45 pm #635338In this case, please disable all plugins that are not related to our theme temporarily and allow us to switch between themes to see the difference.
February 4, 2025 at 4:00 pm #635348
emreyildiz41ParticipantI disabled plugins that are not related to the theme, the problem still persists. You can provide controls with the administrator account I specified in the hide content.
February 4, 2025 at 4:04 pm #635352
emreyildiz41ParticipantWhen I enable WP_DEBUG_DISPLAY I get these errors
February 4, 2025 at 4:15 pm #635359We see that errors are caused by the code you added to the child theme. Please switch to the parent theme and test how it works.
February 4, 2025 at 4:28 pm #635366
emreyildiz41ParticipantThe error on the rest-api page was fixed when I switched to the main theme. However, the database problems still persist.
February 4, 2025 at 4:31 pm #635367
emreyildiz41ParticipantI don’t understand why these codes I added to the child theme give an error. Do you see any problems?
add_shortcode( ‘product_description’, ‘display_product_description’ );
function display_product_description( $atts ){
$atts = shortcode_atts( array(
‘id’ => get_the_id(),
), $atts, ‘product_description’ );global $product;
if ( ! is_a( $product, ‘WC_Product’) )
$product = wc_get_product($atts[‘id’]);$description = $product->get_description();
$first_sentence = strtok($description, ‘.’);
return $first_sentence . ‘.’;
}February 4, 2025 at 4:38 pm #635370Try to use the following solution for the database errors https://xtemos.com/forums/topic/urgent-issue-with-wishlist-functionality/#post-581264
Unfortunately, we don’t know what is wrong with the custom code and why it doesn’t work. -
AuthorPosts
- You must be logged in to create new topics. Login / Register