Plugin Directory

Changeset 3326054


Ignore:
Timestamp:
07/11/2025 04:46:36 AM (9 months ago)
Author:
vedicastroapiadmin
Message:

Bug fixing related to woocommerce

Location:
vedicastroapi/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • vedicastroapi/trunk/ReadMe.txt

    r3325107 r3326054  
    44Requires at least: 6.0
    55Tested up to: 6.7
    6 Stable tag: 2.0.1
     6Stable tag: 2.0.2
    77Requires PHP: 7.4 or later
    88Donate link: https://vedicastroapi.com/
     
    101101
    102102== Changelog ==
     103= 2.0.2 =
     104* Version 2.0.2 - January 27, 2025
     105* Information: Fix critical error due to woocommerce not install.
     106
    103107= 2.0.1 =
    104108* Version 2.0.1 - July nuary 09, 2025
     
    172176
    173177== Upgrade Notice ==
     178= 2.0.2 =
     179* Title: "Plugin Update Available"
     180* Introduction: "A new version of VedicAstroAPI is now available."
     181* Description: "The new version includes bug fixes related to woocommerce."
     182
    174183= 2.0.1 =
    175184* Title: "Plugin Update Available"
  • vedicastroapi/trunk/public/class-vedic-astro-api-public.php

    r3324957 r3326054  
    198198            "generate_kundali_pdf",
    199199        ]);
    200         add_action('woocommerce_checkout_create_order_line_item', array($this, 'save_custom_data_in_order_meta'), 10, 4);
    201 
    202         //add_action('woocommerce_thankyou', array($this, 'execute_pdf_api_after_order'), 10, 1);
    203         add_action('template_redirect', array($this, 'custom_override_thankyou_template'));
    204         //add_action('template_redirect',  array($this, 'redirect_wc_thankyou_to_custom'));
    205 
    206         add_action('init', array($this,  'register_custom_thankyou_endpoint'));
    207         //add_filter('woocommerce_get_return_url', array($this,  'redirect_to_custom_thankyou_page'), 10, 2);
    208         add_filter('woocommerce_add_to_cart_validation',  array($this, 'block_non_pdf_products_if_pdf_exists'), 10, 3);
    209 
    210         add_action('woocommerce_order_details_after_order_table', array($this, 'display_kundali_pdf_on_order_page'));
    211         add_action('pre_get_posts', array($this, 'hide_pdf_products_from_frontend'));
    212         add_action('template_redirect', array($this,  'restrict_pdf_product_single_page'));
     200        if (class_exists('WooCommerce')) {
     201            add_action('woocommerce_checkout_create_order_line_item', array($this, 'save_custom_data_in_order_meta'), 10, 4);
     202
     203            //add_action('woocommerce_thankyou', array($this, 'execute_pdf_api_after_order'), 10, 1);
     204            add_action('template_redirect', array($this, 'custom_override_thankyou_template'));
     205            //add_action('template_redirect',  array($this, 'redirect_wc_thankyou_to_custom'));
     206
     207            add_action('init', array($this,  'register_custom_thankyou_endpoint'));
     208            //add_filter('woocommerce_get_return_url', array($this,  'redirect_to_custom_thankyou_page'), 10, 2);
     209            add_filter('woocommerce_add_to_cart_validation',  array($this, 'block_non_pdf_products_if_pdf_exists'), 10, 3);
     210
     211            add_action('woocommerce_order_details_after_order_table', array($this, 'display_kundali_pdf_on_order_page'));
     212            add_action('pre_get_posts', array($this, 'hide_pdf_products_from_frontend'));
     213            add_action('template_redirect', array($this,  'restrict_pdf_product_single_page'));
     214        }
    213215    }
    214216
  • vedicastroapi/trunk/vedic-astro-api.php

    r3325107 r3326054  
    1717 * Plugin URI:        https://vedicastroapi.com
    1818 * Description:       Horoscope and Astrology is the first vedic astrology plugin that lets you generate horoscope reports based on the birth details.
    19  * Version:           2.0.1
     19 * Version:           2.0.2
    2020 * Author:            Vedic Astro API
    2121 * Author URI:        https://sohamsolution.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'VEDIC_ASTRO_API_VERSION', '2.0.1' );
     38define( 'VEDIC_ASTRO_API_VERSION', '2.0.2' );
    3939define( 'VEDICASTRO_URL', plugin_dir_url( __FILE__ ) );
    4040define( 'VEDIC_ASTRO_API_ROOT_URL', 'https://api.vedicastroapi.com/v3-json/' );
Note: See TracChangeset for help on using the changeset viewer.