📌  相关文章
📜  woocommerce 更改相关产品 tect - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:25.749000             🧑  作者: Mango

代码示例1
// CHANGE RELATED PRODUCTS TEXT
function my_text_strings( $translated_text, $text, $domain ) {
    switch ( $translated_text ) {
        case 'Related products' :
            $translated_text = __( 'You may also like...', 'woocommerce' );
            break;
    }
    return $translated_text;
}
add_filter( 'gettext', 'my_text_strings', 20, 3 );