Skip to content

Instantly share code, notes, and snippets.

View Programmer095's full-sized avatar

Cory Hyland Programmer095

  • Earth
View GitHub Profile
@trey8611
trey8611 / append_acf_repeater_data.md
Last active November 2, 2022 09:18
WP All Import & ACF Add-On - How to append data to repeaters | pmxi_saved_post

Append ACF Repeater Data

It's not possible to append a row to an ACF repeater field without a custom code workaround that utilizes our API: http://www.wpallimport.com/documentation/developers/action-reference/.

The following is an example to show you how this can be done. You will almost certainly need to adjust the code snippet to make it work with your data/site.

  1. Create a new "Manual Record Matching" import that updates the post(s): http://www.wpallimport.com/documentation/recurring/manual-record-matching/

  2. Store the ACF data in your own dummy custom field: http://d.pr/i/3Si4ad.

@theodorejb
theodorejb / convert_array_access_braces.php
Last active March 27, 2024 18:22
Migrate deprecated curly brace array access syntax to bracket syntax. Requires PHP 7.4.
<?php
error_reporting(E_ALL);
$opts = getopt('f:d:rb:', ['ext:', 'php:', 'diff::']);
if ((int)isset($opts['d']) + (int)isset($opts['f']) !== 1) {
$self = basename(__FILE__);
echo <<<EOF
Usage:
php $self -f<php_script> [-b] [--php <path_to_php>] [ --diff [<file>]]
@trey8611
trey8611 / Import Types.md
Last active July 26, 2021 12:56 — forked from KittenCodes/Import Types.md
WP All Import - A description of different import types "New Items" and "Existing Items"

A description of import types

  • New Items Import -

This is primarily used to create and manage products. It keeps internal track of the products that it imports, which means that it can later update/create/delete products as they're changed/added/removed in your import file (see: http://www.wpallimport.com/documentation/recurring/update-import). It's also the only import type that can add/remove variations for variable products.

One limitation of new items imports is that cannot detect/update products that it didn't previously create. If you need to use a "New Items" import with a file that contains existing products, you can use WP All Import's API to prevent duplicates from being imported: https://www.wpallimport.com/documentation/developers/code-snippets/#do-not-create-products-with-duplicate-sku.

  • Existing Items Import -
@mbissett
mbissett / Import Types.md
Last active April 27, 2021 11:07 — forked from trey8611/Import Types.md
WP All Import - Import Types

A description of import types

  • New Items Import -

This is primarily used to create and manage products. It keeps internal track of the products that it imports, which means that it can later update/create/delete products as they're changed/added/removed in your import file. It's also the only import type that can add/remove variations for variable products.

One limitation of new items imports is that cannot detect/update products that it didn't previously create. If you need to use a "New Items" import with a file that contains existing products, you can use WP All Import's API to prevent duplicates from being imported: https://www.wpallimport.com/documentation/developers/code-snippets/#do-not-create-products-with-duplicate-sku.