• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/site/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/site/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/site/index.php
Line: 315
Function: require_once

I'm confused about how text domain in WP translation works.

In my functions.php under my theme, I added the function below.

function add_wcmp_endpoints_query_vars($endpoints) {     $endpoints['custom-wcmp-nenu'] = array(         'label' => __('Custom Menu', 'dc-woocommerce-multi-vendor'),         'endpoint' => get_wcmp_vendor_settings('wcmp_custom_vendor_endpoint', 'vendor', 'general', 'custom-wcmp-nenu')     );     return $endpoints; } 

As you can see above, the translation function __('Custom Menu', 'dc-woocommerce-multi-vendor') text domain isdc-woocommerce-multi-vendorwhich is from the WCMP plugin. But my theme has its own text domain saymytheme`.

So, where should I be adding the translation variable Custom Menu in the .pot file? Under the plugin or theme language file?

Or should I be changing all the text domain under functions.php to be mytheme?

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]