Pass variable from theme page template to commerce-product file I am new to drupal and this is my first website in drupal. 
I am looking to pass a variable from newtheme.theme to commerce-product.html.twig but I am not able to do so.

Here is my code (newtheme is name of my theme)

function newtheme_preprocess_page(&amp;$variables) {
 $variables['product_cta'] = 'Static Text';
}


in commerce-product.html.twig

{{product_cta}}


but this is not working  the product_cta will be a call to action which will be calculated programmatically and passed to the product single page.
I am using Drupal 8 and Commerce 2.X.X

Any help is really appreciated.
You can use the next function in your theme / module:

function YOURT_HEME_preprocess_commerce_product(&amp;$variables) {
 $variables['product_cta'] = 'Static Text';
}

function YOURT_MODULE_preprocess_commerce_product(&amp;$variables) {
 $variables['product_cta'] = 'Static Text';
}


And show the variables in the commerce-product.html.twig file:

{{ product_cta }}


;)