WordPress: How to get attachment file size by id?
How to get attachment file size by id? @wordpress $attachment_id = 100; // attachment id $file_size = filesize ( get_attached_file( $attachment_id ) );
How to get attachment file size by id? @wordpress $attachment_id = 100; // attachment id $file_size = filesize ( get_attached_file( $attachment_id ) );
How to get attachment file name by id? @wordpress $attachment_id = 100; // attachment id $thumbnail_name = basename ( get_attached_file( $attachment_id ) );
Google recommends using the new Android App Bundle format for apps uploaded to Google Play. When you upload an APK a warning is displayed which
add_filter ( ‘woocommerce_account_menu_items’, ‘amit_customize_account_menu_items’ ); function amit_customize_account_menu_items( $menu_items ){ //unset( $menu_items[‘dashboard’] ); // Remove Dashboard from My Account Menu //unset( $menu_items[‘orders’] ); // Remove Orders
add_filter ( ‘woocommerce_account_menu_items’, ‘amit_customize_account_menu_items’ ); function amit_customize_account_menu_items( $menu_items ){ // Chnage the Menu Item name text $menu_items[‘dashboard’] = ‘My Account’; // Rename "Dasboard" in My
How to Add a New Tab @ WooCommerce My Account Page function bbloomer_add_premium_support_endpoint() { add_rewrite_endpoint( ‘my-ads’, EP_ROOT | EP_PAGES ); } add_action( ‘init’, ‘bbloomer_add_premium_support_endpoint’ );
Add Custom URL in My Account menu in any position in woocommerce function misha_one_more_link( $menu_links ){ // we will hook "anyuniquetext123" later $new = array(
To add custom HTML to the tab title you can create an array from your icons and change nvaigation.php in the woocommerce template folder like below: $icons = [
$coupon_code = ‘TASTY10’; global $woocommerce; $c = new WC_Coupon($coupon_code); echo “Discount Amount “.$c->amount.””;//Get Discount amount echo “Discount Type “.$c->discount_type.””;//Get type of discount echo “Individual Use
add_action( ‘woocommerce_email_after_order_table’, ‘add_payment_method_to_admin_new_order’, 15, 2 ); /** * Add used coupons to the order confirmation email * */ function add_payment_method_to_admin_new_order( $order, $is_admin_email ) { if
Got a Question? Check out our FAQ Section.