If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
| <?php | |
| /** | |
| * JetEngine CCT-related API functions to use in theme or plugin | |
| * | |
| * Theme usage - include get_theme_file_path( 'jet-engine-cct-api.php' ); | |
| * Plugin usage - include PLUGIN_PATH . 'path-to-file-inside-plugin/jet-engine-cct-api.php'; | |
| */ | |
| /** |
If you have a slow import, or if you're running into a lot of server timeouts, then you can follow these steps to optimize your import.
Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.
| <?php | |
| /** | |
| * Plugin Name: Convert ACF PHP to JSON | |
| * Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
| */ | |
| namespace ConvertAcfPhpToJson; | |
| /** | |
| * Add submenu item under 'Custom Fields' |
| <?php | |
| /** | |
| * Custom Loop Add to Cart. | |
| * | |
| * Template with quantity and ajax. | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly. | |
| global $product; |
| <?php | |
| // add taxoonomy term to body_class | |
| function woo_custom_taxonomy_in_body_class( $classes ){ | |
| if( is_singular( 'product' ) ) | |
| { | |
| $custom_terms = get_the_terms(0, 'product_cat'); | |
| if ($custom_terms) { | |
| foreach ($custom_terms as $custom_term) { | |
| $classes[] = 'product_cat_' . $custom_term->slug; |
| /* To use: | |
| 1. Add this snippet to your theme's functions.php file | |
| 2. Change the meta key names in the snippet | |
| 3. Create a custom field in the order post - e.g. key = "Tracking Code" value = abcdefg | |
| 4. When next updating the status, or during any other event which emails the user, they will see this field in their email | |
| */ | |
| add_filter('woocommerce_email_order_meta_keys', 'my_custom_order_meta_keys'); | |
| function my_custom_order_meta_keys( $keys ) { | |
| $keys[] = 'Tracking Code'; // This will look for a custom field called 'Tracking Code' and add it to emails |