Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
define( 'PDF_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); /* plugin directory url */
define( 'PDF_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); /* the plugin basename */
define( 'GPDF_PLUGIN_FILE', __FILE__ );
define( 'GPDF_API_URL', 'https://api.gravitypdf.com' );

/* Allow wp-config.php to point licensing/update requests at a staging endpoint */
if ( ! defined( 'GPDF_API_URL' ) ) {
define( 'GPDF_API_URL', 'https://api.gravitypdf.com' );
}

if ( ! class_exists( 'GFPDF_Major_Compatibility_Checks' ) ) {
/*
Expand Down
6 changes: 6 additions & 0 deletions src/Model/Model_Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ function ( $addon ) {
)
);

/*
* Keep $bulk_api_params numerically indexed. The API keys its response array by the same
* keys it receives, so numeric indices make it return a JSON array (which the response
* handlers below decode via is_array()). Switching to slug keys would return a JSON object
* and silently break bulk handling.
*/
$bulk_api_params = [];
foreach ( $products as $product ) {
/* skip improperly-registered plugins */
Expand Down
Loading