Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #866533

    I’m trying to change the “In Stock” & “Out of Stock” texts in Woocommerce, I applied the below code in function file, it worked but on the product page only and it is also displaying the number of products beside my custom text i.e., “1 Available”.

    What i want to do is to remove that number of product and it should only display “Available” or “Sold”, plus; need to stylize these texts in green and red color boxes. Also the same should change on the Wp-Admin as well in Woocommerce products area i.e., instead of “In Stock” & “Out of Stock” it need to be “Available” & ” Sold”.

    Below is the code i used in function file.

    Thanks & Regards,

    Awaiting.

    /**
    * Change In Stock / Out of Stock Text
    */

    add_filter( ‘woocommerce_get_availability’, ‘wcs_custom_get_availability’, 1, 2);
    function wcs_custom_get_availability( $availability, $_product ) {
    global $product;
    // Change In Stock Text
    if ( $_product->is_in_stock() ) {
    $availability[‘availability’] = $product->get_stock_quantity() . __(‘ plekken beschikbaar’, ‘woocommerce’);
    }

    // Change Out of Stock Text
    if ( ! $_product->is_in_stock() ) {
    $availability[‘availability’] = __(‘VOL! Sorry…’, ‘woocommerce’);
    }

    return $availability;
    }

    #866534

    Also, every product is unique and one piece only. I just noticed that it adds 1×1 on cart and checkout pages. I want to remove that x1, 2, 3 as well. How to achieve this? Any help will be appreciated. Thanking you

    #866535

    Update: I sorted out the it on product page on front-end, now need your help with the same changes on back-end.

    #866536

    Also, I don’t want the description tab on products page, it should directly show the additional information tab only and that too i want to rename.

    #867007

    Hi mschon1,

    Ok, so what are the remaining issues that you need our help with? Can you summarize?

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #871462

    Hello Victoria,

    Thank you for your reply.

    I have 2 more issues;

    1. How to display “My Account” instead of “Login / Register” for logged in users in Woocommerce?
    2. On single product pages in page title the “Shop” link, i need to change it. Where to make these changes?

    I hope this screenshot will make things more clear to you; http://www.chinapakhills.com/wp-content/uploads/2017/11/enfold.jpg

    Also, Istarted a new thread for this, which can be found here;

    Thanks & Regards.

    #872815

    Hi,
    To change the text try a plugin such as: WooCommerce Customizer

    Best regards,
    Mike

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.