• I am not fully sure how functions work.
    In using the DIVI/Woo plug in modules, one (called Woo additional info)posts an H2 tag on a product page that only says “Additional information” As far as I can trace, the function below in the files is the only mention of Additional information.
    Despite amending that content between the single quote text, it does not appear any different in the site front end on the page with this literal.
    Am I in the right ballpark or missing completely?

    'additional_information' => array(
    'title'    => esc_html__( 'IS this the LITERAL ??? >> Additional information', 'et_builder' ),
    					'priority' => 20,
    					'callback' => 'woocommerce_product_additional_information_tab',
    				),
    • This topic was modified 3 years, 3 months ago by robmcp.
    • This topic was modified 3 years, 3 months ago by robmcp.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes, anything within single quotes is a string literal. You may then ask, why doesn’t changing it get reflected on the page?

    It’s hard to say based on the information provided. The string on the page could be coming from elsewhere. Some subsequent code could be overriding whatever you had changed. You might be served a cached page which has stale content. Whatever caches may be involved may need to be flushed.

    Thread Starter robmcp

    (@robmcp)

    Thanks, I have cleared caches (everywhere) no change to the literal, and I was told by the devs that was where it was stored. More investigation required..

    Moderator bcworkz

    (@bcworkz)

    The title definition during registration would be the original source, but other code could conceivably change the value prior to actual output. But one example would be via the “gettext” translation filter. It’s normally for translating to another language, but can also be used to alter the phrase’s meaning entirely, in the same language. There are several possible places a value can get changed between registration and output.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Function literal question’ is closed to new replies.