Created
January 30, 2023 10:44
-
-
Save codersaiful/69ce990d523cbc7f14f3a1b821213095 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
remove_action('woocommerce_shop_loop','electro_shop_loop'); | |
add_action('woocommerce_shop_loop','ca_wpt_custom_shoppage_table_temp'); | |
function ca_wpt_custom_shoppage_table_temp(){ | |
$config = get_option( 'wpt_configure_options' ); | |
$table_id = isset( $config['archive_table_id'] ) ? $config['archive_table_id'] : false; | |
$table_id = apply_filters( 'wpto_default_archive_table_id', $table_id ); | |
$table_id = is_numeric( $table_id ) ? (int) $table_id : false; | |
$id = get_queried_object_id(); | |
$taxo_table_id = get_term_meta( $id, 'table_id', true ); | |
if( ! empty( $taxo_table_id ) && is_numeric( $taxo_table_id ) ){ | |
$table_id = $taxo_table_id; | |
} | |
if( $table_id ){ | |
echo do_shortcode( "[Product_Table id='{$table_id}']" ); | |
} | |
// var_dump($config); | |
// echo "Hello World"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment