Home Forums WoodMart support forum My rest-api setting is not working

My rest-api setting is not working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #635218

    emreyildiz41
    Participant

    I sent the message content secretly

    #635221

    Artem Temos
    Keymaster

    Hello,

    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

    #635249

    emreyildiz41
    Participant

    I tried it with the TwentyTwenty-four theme and it works. I wrote to you because I am sure it is due to the theme.

    #635338

    Artem Temos
    Keymaster

    In 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.

    #635348

    emreyildiz41
    Participant

    I 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.

    #635352

    emreyildiz41
    Participant

    When I enable WP_DEBUG_DISPLAY I get these errors

    #635359

    Artem Temos
    Keymaster

    We 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.

    #635366

    emreyildiz41
    Participant

    The error on the rest-api page was fixed when I switched to the main theme. However, the database problems still persist.

    #635367

    emreyildiz41
    Participant

    I 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 . ‘.’;
    }

    #635370

    Artem Temos
    Keymaster

    Try 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.

Viewing 10 posts - 1 through 10 (of 10 total)