Skip to content

Instantly share code, notes, and snippets.

// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@yanknudtskov
yanknudtskov / wp-media-video-length.php
Created January 30, 2016 21:20
Get video length in WordPress
<?php
$video_meta = get_post_meta( $attachment_ID, '_wp_attachment_metadata', true );
echo $video_meta['length_formatted'];
<?php
add_filter(
'forminator_cform_render_fields',
function( $wrappers, $model_id ) {
if( $model_id != 1441 ){
return $wrappers;
}
$select_fields_data = array(