Skip to content
WPCode Library

WPCode Library

Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!

Get WPCode
See all Features

  • Features
    • Code Snippets Library
    • Smart Conditional Logic
    • Advanced Code Revisions
    • Private Cloud Library
    • Marketing Scripts & Conversion Pixels
  • Pricing
  • Snippets Library
  • Help Center
    • Docs
    • Support
  • Blog
  • Login
  • Get WPCode

Snippets library

Browse Snippets
Claim your Free Profile
Add Snippet

Category: Admin

Override the imported image filename when dealing with dynamic URL’s and replace the file extension

function custom_woo_pd_get_filename_dynamic_filename( $output, $filename ) { // Check we are dealing with https://images.sample-domain.com/is/image/dynamic/products/… if( strpos( $filename, ‘images.sample-domain.com/is/image/dynamic/products’ ) !== false ) { $output = basename( $filename ); // Strip the filename down to the ? character $pos = strpos( $output,…Continue reading

Override the imported image filename when dealing with dynamic URL’s and replace the file extension

function custom_woo_pd_get_filename_dynamic_filename( $output, $filename ) { // Check we are dealing with https://images.sample-domain.com/is/image/dynamic/products/… if( strpos( $filename, ‘images.sample-domain.com/is/image/dynamic/products’ ) !== false ) { $output = basename( $filename ); // Strip the filename down to the ? character $pos = strpos( $output,…Continue reading

Show a unique Order Item row matching the Quantity value for each Order Item

function custom_woo_ce_order_items_individual_output( $output, $order, $order_item ) { if( !empty( $order->order_items ) ) { // Check the Order Item has a Product ID if( !empty( $order_item->product_id ) ) { // Multiply the Order Item by the Quantity value if( !empty( $order_item->quantity…Continue reading

Include Quantity and Cost details in TM Extra Product Options columns

add_filter( ‘woo_ce_enable_advanced_extra_product_options’, ‘__return_true’ );Continue reading

Override the default store XML node in exports

// Rename the default store node to Orders function custom_woo_ce_export_xml_store_node( $node = ” ) { return ‘Orders’; } add_filter( ‘woo_ce_export_xml_store_node’, ‘custom_woo_ce_export_xml_store_node’ );Continue reading

Override the default order_items XML node in exports

// Rename the default order_items to OrderLineItem function custom_woo_ce_export_xml_order_items_node( $node = ” ) { return ‘OrderLineItem’; } add_filter( ‘woo_ce_export_xml_order_items_node’, ‘custom_woo_ce_export_xml_order_items_node’ );Continue reading

Override the default order_items XML node in exports

// Rename the default order_items to OrderLineItem function custom_woo_ce_export_xml_order_items_node( $node = ” ) { return ‘OrderLineItem’; } add_filter( ‘woo_ce_export_xml_order_items_node’, ‘custom_woo_ce_export_xml_order_items_node’ ); ?>Continue reading

Modify the Order Items export to show individual Product quantity per row

function custom_woo_ce_order_items_individual_output( $output, $order, $order_item ) { if( !empty( $order->order_items ) ) { // Check the Order Item has a Product ID if( !empty( $order_item->product_id ) ) { // Multiply the Order Item by the Quantity value if( !empty( $order_item->quantity…Continue reading

Override the default Product Brand Term Taxonomy detection in Product Importer Deluxe

Continue reading

Include Products with Post Status “Private” by default in Product exports

function custom_woo_ce_get_products_status( $status = array() ) { $status[] = ‘private’; return $status; } add_filter( ‘woo_ce_get_products_status’, ‘custom_woo_ce_get_products_status’ );Continue reading

Page navigation

Previous 1 … 139 140 141 142 143 … 223 Next

Company

  • About
  • Careers
  • Testimonials
  • Blog
  • Affiliates
  • Contact
  • Twitter
  • Facebook

Powerful Code Features

  • Ready-made Snippets Library
  • Smart Conditional Logic
  • Advanced Auto-insert Locations
  • Global Header & Footer Scripts
  • Safe Error Handling
  • WordPress Code Generators

  • Ecommerce Conversion Pixels
  • Dynamic Content Elements
  • Reduce Number of Plugins
  • Save Snippets in Cloud
  • Easy Code Management
  • Advanced Code Revisions

Helpful Links

  • Support
  • Documentation
  • Plans & Pricing
  • WordPress Hosting
  • Start a Blog
  • Make a Website

Copyright © 2025 WPCode. WPCode® is a registered trademark of WPCode, LLC

Terms of Service
Privacy Policy
FTC Disclosure
Sitemap
WPCode Coupon

The WordPress® trademark is the intellectual property of the WordPress Foundation. Uses of the WordPress®, names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation. WPCode is not endorsed or owned by, or affiliated with, the WordPress Foundation.

Snippet Preview