Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter punkadelic

    (@punkadelic)

    I found a solution :

    In oceanwp > inc > woocommerce > woocommerce-config.php

    In function add_cart_single_product_ajax() (line 690), I added two lines like this :

    public static function add_cart_single_product_ajax() {
    
    	$product_id   = sanitize_text_field( $_POST['product_id'] );
    	$variation_id = sanitize_text_field( $_POST['variation_id'] );
    	$variation    = $_POST['variation'];
    	$quantity     = sanitize_text_field( $_POST['quantity'] );
    
    	if ( $variation_id ) {
    		$product_variation = wc_get_product( sanitize_text_field( $_POST['variation_id'] ) );
    		$product_id = $product_variation->get_parent_id();
    		...

    How can I get this modification into my child theme ?

    Thank you

    Thread Starter punkadelic

    (@punkadelic)

    Hello,

    I found the solution.

    Just copy the wpml-config.xml file and paste it into the child theme.

    Then, you have to rename the tag :

    <key name="theme_mods_oceanwp">

    as follows :

    <key name="theme_mods_child_theme_name">

    and let’s go!

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)