Advertisement
palsushobhan

GeoMyWP-with-WPML

Jun 23rd, 2023
959
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 1 0
  1. add_action( 'end_wcfm_products_manage', function() {
  2.     global $WCFM;
  3.     remove_action( 'end_wcfm_products_manage', array( $WCFM->wcfm_integrations, 'wcfm_geomywp_products_manage_views' ), 100 );
  4. }, 99 );
  5.  
  6. add_action( 'after_wcfm_products_manage_tabs_content', function() {
  7.     global $WCFM;
  8.     if( apply_filters( 'wcfm_is_allow_geo_my_wp', true ) ) {
  9.         if( WCFM_Dependencies::wcfm_geo_my_wp_plugin_active_check() ) {
  10.             $WCFM->template->get_template( 'integrations/wcfm-view-geomywp-products-manage.php' );
  11.         }
  12.     }
  13. } );
  14.  
  15. add_action('after_wcfm_products_manage', function() {
  16.     ?>
  17.     <script>
  18.         jQuery(function($) {
  19.             var triggerChange = function triggerChange() {
  20.                 setTimeout(function() {
  21.                     $('.wcfm-tabWrap div.page_collapsible:visible:first').trigger('click');
  22.                 }, 1000);
  23.             };
  24.             $( document.body ).on( 'wcfm_product_type_changed', triggerChange);
  25.         });
  26.     </script>
  27.     <?php
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement